mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 03:49:05 +02:00
--- Merging r43504 into '.':
U compiler/nmat.pas --- Recording mergeinfo for merge of r43504 into '.': U . git-svn-id: branches/fixes_3_2@43505 -
This commit is contained in:
parent
d201755ba2
commit
afa7c478a2
@ -706,17 +706,31 @@ implementation
|
||||
if is_constintnode(left) then
|
||||
begin
|
||||
lvalue:=tordconstnode(left).value;
|
||||
{ shl/shr are unsigned operations, so cut off upper bits }
|
||||
case resultdef.size of
|
||||
1:
|
||||
lvalue:=lvalue and byte($ff);
|
||||
2:
|
||||
lvalue:=lvalue and word($ffff);
|
||||
4:
|
||||
lvalue:=lvalue and dword($ffffffff);
|
||||
8:
|
||||
lvalue:=lvalue and qword($ffffffffffffffff);
|
||||
else
|
||||
internalerror(2013122301);
|
||||
end;
|
||||
case nodetype of
|
||||
shrn:
|
||||
lvalue:=tordconstnode(left).value shr rvalue;
|
||||
lvalue:=lvalue shr rvalue;
|
||||
shln:
|
||||
lvalue:=tordconstnode(left).value shl rvalue;
|
||||
lvalue:=lvalue shl rvalue;
|
||||
else
|
||||
internalerror(2019050517);
|
||||
end;
|
||||
if forinline then
|
||||
{ discard shifted-out bits (shl never triggers overflow/range errors) }
|
||||
if forinline and
|
||||
(nodetype=shln) then
|
||||
begin
|
||||
{ shl/shr are unsigned operations, so cut off upper bits }
|
||||
case resultdef.size of
|
||||
1:
|
||||
lvalue:=lvalue and byte($ff);
|
||||
@ -727,7 +741,7 @@ implementation
|
||||
8:
|
||||
lvalue:=lvalue and qword($ffffffffffffffff);
|
||||
else
|
||||
internalerror(2013122301);
|
||||
internalerror(2019111701);
|
||||
end;
|
||||
end;
|
||||
result:=create_simplified_ord_const(lvalue,resultdef,forinline,false);
|
||||
|
@ -3430,7 +3430,7 @@ unit cgx86;
|
||||
list.concat(Taicpu.Op_reg(A_PUSH,S_L,NR_ECX));
|
||||
list.concat(Taicpu.Op_reg(A_PUSH,S_L,NR_EBX));
|
||||
list.concat(Taicpu.Op_reg(A_PUSH,S_L,NR_EAX));
|
||||
inc(stackmisalignment,4*2+6*8);
|
||||
inc(stackmisalignment,4*2+6*4);
|
||||
end;
|
||||
{$endif i386}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user