Browse Source

* Do not replace ADD by SUB and vice-versa when overflow checking is enabled. Fixes tw15304 for ARM.

git-svn-id: trunk@23517 -
yury 12 years ago
parent
commit
d8902af3d6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/arm/cgcpu.pas

+ 1 - 1
compiler/arm/cgcpu.pas

@@ -791,7 +791,7 @@ unit cgcpu;
 
 
       begin
       begin
         ovloc.loc:=LOC_VOID;
         ovloc.loc:=LOC_VOID;
-        if {$ifopt R+}(a<>-2147483648) and{$endif} is_shifter_const(-a,shift) then
+        if {$ifopt R+}(a<>-2147483648) and{$endif} not setflags and is_shifter_const(-a,shift) then
           case op of
           case op of
             OP_ADD:
             OP_ADD:
               begin
               begin