MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / GetILOperandPreOrPostIndex

Function GetILOperandPreOrPostIndex

arch/arm64/il.cpp:264–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262}
263
264static 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 */
285static ExprId GetILOperandPreIndex(LowLevelILFunction& il, InstructionOperand& operand)

Callers 2

GetILOperandPreIndexFunction · 0.85
GetILOperandPostIndexFunction · 0.85

Calls 2

ConstMethod · 0.45
RegisterMethod · 0.45

Tested by

no test coverage detected