mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-05 00:10:37 +02:00
* set the bit mask, used for modulus by power-of-2 in a way, that is independent
from the sign of the divisor (so that negative powers of 2 can be supported as well in the future) git-svn-id: trunk@36928 -
This commit is contained in:
parent
92510ebe08
commit
910e1eccc8
@ -574,7 +574,7 @@ implementation
|
||||
exit;
|
||||
|
||||
shiftval:=left.resultdef.size*8-1;
|
||||
dec(tordconstnode(right).value.uvalue);
|
||||
tordconstnode(right).value.uvalue:=qword((qword(1) shl power)-1);
|
||||
|
||||
result:=internalstatements(statements);
|
||||
temp:=ctempcreatenode.create(left.resultdef,left.resultdef.size,tt_persistent,true);
|
||||
@ -618,7 +618,7 @@ implementation
|
||||
end
|
||||
else
|
||||
begin
|
||||
dec(tordconstnode(right).value.uvalue);
|
||||
tordconstnode(right).value.uvalue:=qword((qword(1) shl power)-1);
|
||||
result := caddnode.create(andn,left,right);
|
||||
end;
|
||||
{ left and right are reused }
|
||||
|
Loading…
Reference in New Issue
Block a user