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