2
0
Эх сурвалжийг харах

Fix overflow when value is high(int64) in OptPass1And method

git-svn-id: trunk@45734 -
pierre 5 жил өмнө
parent
commit
ec3fe2f990

+ 2 - 1
compiler/armgen/aoptarm.pas

@@ -940,7 +940,8 @@ Implementation
             remove either the and or the lsl/xsr sequence if possible
           }
 
-          else if cutils.ispowerof2(taicpu(p).oper[2]^.val+1,i) and
+          else if (taicpu(p).oper[2]^.val < high(int64)) and 
+	    cutils.ispowerof2(taicpu(p).oper[2]^.val+1,i) and
             GetNextInstructionUsingReg(p,hp1,taicpu(p).oper[0]^.reg) and
             MatchInstruction(hp1, A_MOV, [taicpu(p).condition], [PF_None]) and
             (taicpu(hp1).ops=3) and