mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-11 10:29:21 +02:00
* don't do mul->shl optimizations when compiling with overflow checking
* keep operand size sign information in shl/shr git-svn-id: trunk@3566 -
This commit is contained in:
parent
14965179c4
commit
55962cef95
@ -165,14 +165,21 @@ implementation
|
||||
op:=A_SHR;
|
||||
|
||||
{ special treatment of 32bit values for backwards compatibility }
|
||||
{ mul optimizations require to keep the sign (FK) }
|
||||
if left.resulttype.def.size<=4 then
|
||||
begin
|
||||
opsize:=OS_32;
|
||||
if is_signed(left.resulttype.def) then
|
||||
opsize:=OS_S32
|
||||
else
|
||||
opsize:=OS_32;
|
||||
mask:=31;
|
||||
end
|
||||
else
|
||||
begin
|
||||
opsize:=OS_64;
|
||||
if is_signed(left.resulttype.def) then
|
||||
opsize:=OS_S64
|
||||
else
|
||||
opsize:=OS_64;
|
||||
mask:=63;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user