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

git-svn-id: trunk@45734 -
This commit is contained in:
pierre 2020-07-06 13:50:10 +00:00
parent 8306c7ca79
commit ec3fe2f990

View File

@ -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