Fix handling of parameters with size below the size of a full register

git-svn-id: trunk@44380 -
This commit is contained in:
pierre 2020-03-28 13:13:04 +00:00
parent 17298086ca
commit 41e554067a

View File

@ -1229,8 +1229,12 @@ implementation
shifted to the top of the to 4 resp. 8 byte register on the
caller side and needs to be stored with those bytes at the
start of the reference -> don't shift right }
else if (paraloc.shiftval<0) and
((-paraloc.shiftval) in [8,16,32]) then
else if (paraloc.shiftval<0)
{$ifdef CPU64BITALU}
and ((-paraloc.shiftval) in [56{for byte},48{for two bytes},32{for four bytes}])
{$else}
and ((-paraloc.shiftval) in [24{for byte},16{for two bytes}])
{$endif} then
begin
a_op_const_reg_reg(list,OP_SHR,OS_INT,-paraloc.shiftval,paraloc.register,paraloc.register);
{ convert to a register of 1/2/4 bytes in size, since the