| 157 | } |
| 158 | |
| 159 | bool X86Instr::StackAdjust(uint32& adjust) |
| 160 | { |
| 161 | if (adjust == 0) |
| 162 | return true; |
| 163 | |
| 164 | if (mMCInst.getOpcode() != X86::SUB32ri8) |
| 165 | return true; |
| 166 | |
| 167 | auto operand0 = mMCInst.getOperand(0); |
| 168 | if (operand0.getReg() != llvm::X86::ESP) |
| 169 | return true; |
| 170 | auto operand2 = mMCInst.getOperand(2); |
| 171 | if (!operand2.isImm()) |
| 172 | return false; |
| 173 | |
| 174 | adjust -= (uint32)operand2.getImm(); |
| 175 | |
| 176 | return true; |
| 177 | } |
| 178 | |
| 179 | bool X86Instr::IsBranch() |
| 180 | { |