MCPcopy Create free account
hub / github.com/capstone-engine/capstone / mapping_get_op_access

Function mapping_get_op_access

Mapping.c:225–238  ·  view source on GitHub ↗

Returns the operand access flags from the mapping table for instruction operands. Only usable by `auto-sync` archs!

Source from the content-addressed store, hash-verified

223/// mapping table for instruction operands.
224/// Only usable by `auto-sync` archs!
225const cs_ac_type mapping_get_op_access(MCInst *MI, unsigned OpNum,
226 const map_insn_ops *insn_ops_map,
227 size_t map_size)
228{
229 assert(MI);
230 assert(MI->Opcode < map_size);
231 assert(OpNum < sizeof(insn_ops_map[MI->Opcode].ops) /
232 sizeof(insn_ops_map[MI->Opcode].ops[0]));
233
234 cs_ac_type access = insn_ops_map[MI->Opcode].ops[OpNum].access;
235 if (MCInst_opIsTied(MI, OpNum) || MCInst_opIsTying(MI, OpNum))
236 access |= (access == CS_AC_READ) ? CS_AC_WRITE : CS_AC_READ;
237 return access;
238}
239
240/// Returns the operand at detail->arch.operands[op_count + offset]
241/// Or NULL if detail is not set.

Callers

nothing calls this directly

Calls 2

MCInst_opIsTiedFunction · 0.85
MCInst_opIsTyingFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…