mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-11 17:30:29 +02:00
* fixed a missed "(1 shl 32) - 1 = 0" problem for x86
git-svn-id: trunk@4491 -
This commit is contained in:
parent
ba334905f0
commit
0be55cf230
@ -1137,7 +1137,8 @@ implementation
|
||||
restbits := (sref.bitlen - (loadbitsize - sref.startbit));
|
||||
a_op_const_reg(list,OP_SHL,OS_INT,restbits,valuereg);
|
||||
{ mask other bits }
|
||||
a_op_const_reg(list,OP_AND,OS_INT,(1 shl sref.bitlen)-1,valuereg);
|
||||
if (sref.bitlen <> AIntBits) then
|
||||
a_op_const_reg(list,OP_AND,OS_INT,(1 shl sref.bitlen)-1,valuereg);
|
||||
a_op_const_reg(list,OP_SHR,OS_INT,loadbitsize-restbits,extra_value_reg)
|
||||
end
|
||||
else
|
||||
@ -1146,7 +1147,8 @@ implementation
|
||||
a_op_const_reg(list,OP_SHR,OS_INT,sref.startbit,valuereg);
|
||||
a_op_const_reg(list,OP_SHL,OS_INT,loadbitsize-sref.startbit,extra_value_reg);
|
||||
{ mask other bits }
|
||||
a_op_const_reg(list,OP_AND,OS_INT,(1 shl sref.bitlen)-1,extra_value_reg);
|
||||
if (sref.bitlen <> AIntBits) then
|
||||
a_op_const_reg(list,OP_AND,OS_INT,(1 shl sref.bitlen)-1,extra_value_reg);
|
||||
end;
|
||||
{ merge }
|
||||
a_op_reg_reg(list,OP_OR,OS_INT,extra_value_reg,valuereg);
|
||||
|
Loading…
Reference in New Issue
Block a user