mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 10:29:24 +02:00
Swap real constant in internal assembler
This commit is contained in:
parent
e3b93b07c6
commit
2044868c10
@ -2176,7 +2176,12 @@ Implementation
|
|||||||
eextended : floatx80;
|
eextended : floatx80;
|
||||||
{$endif}
|
{$endif}
|
||||||
{$endif}
|
{$endif}
|
||||||
ccomp : comp;
|
{$ifdef FPC_COMP_IS_INT64}
|
||||||
|
ccomp: int64;
|
||||||
|
{$else}
|
||||||
|
ccomp: comp;
|
||||||
|
{$endif}
|
||||||
|
comp_data_size : byte;
|
||||||
tmp : word;
|
tmp : word;
|
||||||
cpu: tcputype;
|
cpu: tcputype;
|
||||||
ddword : dword;
|
ddword : dword;
|
||||||
@ -2290,12 +2295,22 @@ Implementation
|
|||||||
{$endif cpuextended}
|
{$endif cpuextended}
|
||||||
aitrealconst_s64comp:
|
aitrealconst_s64comp:
|
||||||
begin
|
begin
|
||||||
|
{$ifdef FPC_COMP_IS_INT64}
|
||||||
|
ccomp:=system.trunc(tai_realconst(hp).value.s64compval);
|
||||||
|
{$else}
|
||||||
ccomp:=comp(tai_realconst(hp).value.s64compval);
|
ccomp:=comp(tai_realconst(hp).value.s64compval);
|
||||||
|
{$endif}
|
||||||
pdata:=@ccomp;
|
pdata:=@ccomp;
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
internalerror(2015030501);
|
internalerror(2015030501);
|
||||||
end;
|
end;
|
||||||
|
if source_info.endian<>target_info.endian then
|
||||||
|
begin
|
||||||
|
for d:=0 to tai_realconst(hp).datasize-1 do
|
||||||
|
lebbuf[d]:=pbyte(pdata)[tai_realconst(hp).datasize-1-d];
|
||||||
|
pdata:=@lebbuf;
|
||||||
|
end;
|
||||||
ObjData.writebytes(pdata^,tai_realconst(hp).datasize);
|
ObjData.writebytes(pdata^,tai_realconst(hp).datasize);
|
||||||
ObjData.writebytes(zerobuf,tai_realconst(hp).savesize-tai_realconst(hp).datasize);
|
ObjData.writebytes(zerobuf,tai_realconst(hp).savesize-tai_realconst(hp).datasize);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user