mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-06 14:47:55 +02:00
* patch by Rike: Use reverse_longword instead of manually reversing longword, resolves #39720
This commit is contained in:
parent
812736bd41
commit
a285500d36
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user