in
PYL-R1714540 return self.shiftStack(displ)
541
542 elif (
543 (inst.mnemonic == "add" or inst.mnemonic == "sub")544 and inst.operands[0].type == self.opTypeREG
545 and (
546 inst.operands[0].reg == X86_REG_RSP
543 (inst.mnemonic == "add" or inst.mnemonic == "sub")
544 and inst.operands[0].type == self.opTypeREG
545 and (
546 inst.operands[0].reg == X86_REG_RSP547 or inst.operands[0].reg == X86_REG_ESP
548 )
549 and inst.operands[1].type == self.opTypeIMM
To check if a variable is equal to one of many values, combine the values into a tuple and check if the variable is contained in
it instead of checking for equality against each of the values.
This is faster, less verbose, and more readable.
if x == 1 or x == 2 or x == 3:
do_something()
if x in (1, 2, 3):
do_something()