* print internalerrors in case we still encounter stray constants not part of

a typed constants
  * don't print superfluous newlines in typed constant definitions

git-svn-id: trunk@35042 -
This commit is contained in:
Jonas Maebe 2016-12-02 12:33:09 +00:00
parent db40e1575d
commit 02e4a27a35

View File

@ -831,8 +831,7 @@ implementation
procedure TLLVMAssember.WriteRealConst(hp: tai_realconst; do_line: boolean);
begin
if do_line and
(fdecllevel=0) then
if fdecllevel=0 then
begin
case tai_realconst(hp).realtyp of
aitrealconst_s32bit:
@ -849,19 +848,20 @@ implementation
else
internalerror(2014050604);
end;
internalerror(2016120202);
end;
case hp.realtyp of
aitrealconst_s32bit:
writer.AsmWriteln(llvmdoubletostr(hp.value.s32val));
writer.AsmWrite(llvmdoubletostr(hp.value.s32val));
aitrealconst_s64bit:
writer.AsmWriteln(llvmdoubletostr(hp.value.s64val));
{$if defined(cpuextended) and defined(FPC_HAS_TYPE_EXTENDED)}
aitrealconst_s80bit:
writer.AsmWriteln(llvmextendedtostr(hp.value.s80val));
writer.AsmWrite(llvmextendedtostr(hp.value.s80val));
{$endif defined(cpuextended)}
aitrealconst_s64comp:
{ handled as int64 most of the time in llvm }
writer.AsmWriteln(tostr(round(hp.value.s64compval)));
writer.AsmWrite(tostr(round(hp.value.s64compval)));
else
internalerror(2014062401);
end;
@ -873,7 +873,7 @@ implementation
consttyp: taiconst_type;
begin
if fdecllevel=0 then
writer.AsmWrite(asminfo^.comment+' const ');
internalerror(2016120203);
consttyp:=hp.consttype;
case consttyp of
aitconst_got,
@ -916,8 +916,11 @@ implementation
writer.AsmWrite('zeroinitializer')
else
writer.AsmWrite(tostr(hp.value));
{
// activate in case of debugging IE 2016120203
if fdecllevel=0 then
writer.AsmLn;
}
end;
else
internalerror(200704251);
@ -1113,7 +1116,7 @@ implementation
ait_string :
begin
if fdecllevel=0 then
writer.AsmWrite(asminfo^.comment);
internalerror(2016120201);
writer.AsmWrite('c"');
for i:=1 to tai_string(hp).len do
begin
@ -1129,7 +1132,7 @@ implementation
end;
writer.AsmWrite(s);
end;
writer.AsmWriteLn('"');
writer.AsmWrite('"');
end;
ait_label :