mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 13:49:12 +02:00
Explicitly disable overflow for offset propagation optimization
This commit is contained in:
parent
99d04fb5b4
commit
8e7791ac23
@ -4308,12 +4308,15 @@ unit aoptx86;
|
|||||||
) then
|
) then
|
||||||
begin
|
begin
|
||||||
OldOffset := taicpu(hp1).oper[0]^.ref^.offset;
|
OldOffset := taicpu(hp1).oper[0]^.ref^.offset;
|
||||||
|
{$push}
|
||||||
|
{$R-}{$Q-}
|
||||||
|
{ Explicitly disable overflow checking for these offset calculation
|
||||||
|
as those do not matter for the final result }
|
||||||
if ActiveReg=taicpu(hp1).oper[0]^.ref^.base then
|
if ActiveReg=taicpu(hp1).oper[0]^.ref^.base then
|
||||||
inc(taicpu(hp1).oper[0]^.ref^.offset,taicpu(p).oper[0]^.val);
|
inc(taicpu(hp1).oper[0]^.ref^.offset,taicpu(p).oper[0]^.val);
|
||||||
if ActiveReg=taicpu(hp1).oper[0]^.ref^.index then
|
if ActiveReg=taicpu(hp1).oper[0]^.ref^.index then
|
||||||
inc(taicpu(hp1).oper[0]^.ref^.offset,taicpu(p).oper[0]^.val*max(taicpu(hp1).oper[0]^.ref^.scalefactor,1));
|
inc(taicpu(hp1).oper[0]^.ref^.offset,taicpu(p).oper[0]^.val*max(taicpu(hp1).oper[0]^.ref^.scalefactor,1));
|
||||||
|
{$pop}
|
||||||
{$ifdef x86_64}
|
{$ifdef x86_64}
|
||||||
if (taicpu(hp1).oper[0]^.ref^.offset > $7FFFFFFF) or (taicpu(hp1).oper[0]^.ref^.offset < -2147483648) then
|
if (taicpu(hp1).oper[0]^.ref^.offset > $7FFFFFFF) or (taicpu(hp1).oper[0]^.ref^.offset < -2147483648) then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user