Selaa lähdekoodia

Explicitly disable overflow for offset propagation optimization

Pierre Muller 3 vuotta sitten
vanhempi
commit
8e7791ac23
1 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  1. 5 2
      compiler/x86/aoptx86.pas

+ 5 - 2
compiler/x86/aoptx86.pas

@@ -4308,12 +4308,15 @@ unit aoptx86;
               ) then
               begin
                 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
                   inc(taicpu(hp1).oper[0]^.ref^.offset,taicpu(p).oper[0]^.val);
                 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));
-
+{$pop}
 {$ifdef x86_64}
                 if (taicpu(hp1).oper[0]^.ref^.offset > $7FFFFFFF) or (taicpu(hp1).oper[0]^.ref^.offset < -2147483648) then
                   begin