m68k: write inline floating point immediates as hex consts, instead of scientific notation. the scientific notation format parsing depends on the libc the assembler was linked against, which can lead to varying results and compile errors

git-svn-id: trunk@48524 -
This commit is contained in:
Károly Balogh 2021-02-08 05:01:45 +00:00
parent d0178f7ae0
commit ada3d2050c

View File

@ -169,7 +169,7 @@ interface
end; end;
function getopstr(var o:toper) : string; function getopstr(size: topsize; var o:toper) : string;
var var
i : tsuperregister; i : tsuperregister;
begin begin
@ -220,10 +220,14 @@ interface
getopstr:='#'+tostr(longint(o.val)); getopstr:='#'+tostr(longint(o.val));
top_realconst: top_realconst:
begin begin
str(o.val_real,getopstr); case size of
if getopstr[1]=' ' then S_FS:
getopstr[1]:='+'; getopstr:='#0x'+hexstr(longint(single(o.val_real)),sizeof(single)*2);
getopstr:='#0d'+getopstr; S_FD:
getopstr:='#0x'+hexstr(BestRealRec(o.val_real).Data,sizeof(bestreal)*2);
else
internalerror(2021020801);
end;
end; end;
else internalerror(200405021); else internalerror(200405021);
end; end;
@ -337,7 +341,7 @@ interface
sep:=':' sep:=':'
else else
sep:=','; sep:=',';
s:=s+sep+getopstr(taicpu(hp).oper[i]^); s:=s+sep+getopstr(taicpu(hp).opsize,taicpu(hp).oper[i]^);
end; end;
end; end;
end; end;