* 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:
florian 2006-05-18 19:30:44 +00:00
parent 14965179c4
commit 55962cef95

View File

@ -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;