* patch by Rike: Use reverse_longword instead of manually reversing longword, resolves #39720

This commit is contained in:
florian 2022-05-13 22:37:43 +02:00
parent 812736bd41
commit a285500d36
2 changed files with 2 additions and 14 deletions

View File

@ -461,13 +461,7 @@ implementation
end
else
begin
location.value:=aint(swapendian(Pcardinal(value_set)^));
location.value:=aint(
reverse_byte (location.value and $ff) or
(reverse_byte((location.value shr 8) and $ff) shl 8) or
(reverse_byte((location.value shr 16) and $ff) shl 16) or
(reverse_byte((location.value shr 24) and $ff) shl 24)
);
location.value:=aint(reverse_longword(Pcardinal(value_set)^));
end;
if (target_info.endian=endian_big) then
location.value:=location.value shr (32-resultdef.size*8);

View File

@ -1420,13 +1420,7 @@ implementation
end
else
begin
setval:=aint(swapendian(Pcardinal(value_set)^));
setval:=aint(
reverse_byte (setval and $ff) or
(reverse_byte((setval shr 8) and $ff) shl 8) or
(reverse_byte((setval shr 16) and $ff) shl 16) or
(reverse_byte((setval shr 24) and $ff) shl 24)
);
setval:=aint(reverse_longword(Pcardinal(value_set)^));
end;
if (target_info.endian=endian_big) then
setval:=setval shr (32-resultdef.size*8);