| 262 | } |
| 263 | |
| 264 | static ExprId GetILOperandPreOrPostIndex(LowLevelILFunction& il, InstructionOperand& operand) |
| 265 | { |
| 266 | if (operand.operandClass != MEM_PRE_IDX && operand.operandClass != MEM_POST_IDX) |
| 267 | return 0; |
| 268 | |
| 269 | if (operand.reg[1] == REG_NONE) |
| 270 | { |
| 271 | // ..., [Xn], #imm |
| 272 | if (IMM_O(operand) == 0) |
| 273 | return 0; |
| 274 | |
| 275 | return ILSETREG_O(operand, ILADDREG_O(operand, il.Const(REGSZ_O(operand), IMM_O(operand)))); |
| 276 | } |
| 277 | else |
| 278 | { |
| 279 | // ..., [Xn], <Xm> |
| 280 | return ILSETREG_O(operand, ILADDREG_O(operand, il.Register(8, operand.reg[1]))); |
| 281 | } |
| 282 | } |
| 283 | |
| 284 | /* Returns an expression that does any pre-incrementing on an operand, if it exists */ |
| 285 | static ExprId GetILOperandPreIndex(LowLevelILFunction& il, InstructionOperand& operand) |
no test coverage detected