mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 09:06:14 +02:00
* fixed (harmless) range error in cross-endian crosscompiling code for
parsing constant sets git-svn-id: trunk@13785 -
This commit is contained in:
parent
1ea6307a78
commit
606b7f4f80
@ -441,10 +441,12 @@ implementation
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
location.value:=swapendian(Pcardinal(value_set)^);
|
location.value:=swapendian(Pcardinal(value_set)^);
|
||||||
location.value:= reverse_byte (location.value and $ff) or
|
location.value:=aint(
|
||||||
(reverse_byte((location.value shr 8) and $ff) shl 8) or
|
reverse_byte (location.value and $ff) or
|
||||||
(reverse_byte((location.value shr 16) and $ff) shl 16) or
|
(reverse_byte((location.value shr 8) and $ff) shl 8) or
|
||||||
(reverse_byte((location.value shr 24) and $ff) shl 24);
|
(reverse_byte((location.value shr 16) and $ff) shl 16) or
|
||||||
|
(reverse_byte((location.value shr 24) and $ff) shl 24)
|
||||||
|
);
|
||||||
end;
|
end;
|
||||||
if (target_info.endian=endian_big) then
|
if (target_info.endian=endian_big) then
|
||||||
location.value:=location.value shr (32-resultdef.size*8);
|
location.value:=location.value shr (32-resultdef.size*8);
|
||||||
|
Loading…
Reference in New Issue
Block a user