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

Function DecodeAddrMode5Operand

arch/ARM/ARMDisassembler.c:2398–2416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2396}
2397
2398static DecodeStatus DecodeAddrMode5Operand(MCInst *Inst, unsigned Val,
2399 uint64_t Address, const void *Decoder)
2400{
2401 DecodeStatus S = MCDisassembler_Success;
2402 unsigned Rn = fieldFromInstruction_4(Val, 9, 4);
2403 // U == 1 to add imm, 0 to subtract it.
2404 unsigned U = fieldFromInstruction_4(Val, 8, 1);
2405 unsigned imm = fieldFromInstruction_4(Val, 0, 8);
2406
2407 if (!Check(&S, DecodeGPRRegisterClass(Inst, Rn, Address, Decoder)))
2408 return MCDisassembler_Fail;
2409
2410 if (U)
2411 MCOperand_CreateImm0(Inst, ARM_AM_getAM5Opc(ARM_AM_add, (unsigned char)imm));
2412 else
2413 MCOperand_CreateImm0(Inst, ARM_AM_getAM5Opc(ARM_AM_sub, (unsigned char)imm));
2414
2415 return S;
2416}
2417
2418static DecodeStatus DecodeAddrMode5FP16Operand(MCInst *Inst, unsigned Val,
2419 uint64_t Address, const void *Decoder)

Callers

nothing calls this directly

Calls 4

MCOperand_CreateImm0Function · 0.85
ARM_AM_getAM5OpcFunction · 0.85
CheckFunction · 0.70
DecodeGPRRegisterClassFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…