clslgrnc / tbrop

Consider using in PYL-R1714
Performance
Major
10 months ago5 years old
Consider merging these comparisons with 'in' by using 'inst.mnemonic in ('add', 'sub')'. Use a set instead if elements are hashable.
540            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
Consider merging these comparisons with 'in' by using 'inst.operands[0].reg in (X86_REG_RSP, X86_REG_ESP)'. Use a set instead if elements are hashable.
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