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

Function DecodeSETPANInstruction

arch/ARM/ARMDisassembler.c:2352–2375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2350}
2351
2352static DecodeStatus DecodeSETPANInstruction(MCInst *Inst, unsigned Insn,
2353 uint64_t Address, const void *Decoder)
2354{
2355 DecodeStatus S = MCDisassembler_Success;
2356 unsigned Imm = fieldFromInstruction_4(Insn, 9, 1);
2357
2358 if (!ARM_getFeatureBits(Inst->csh->mode, ARM_HasV8_1aOps) || !ARM_getFeatureBits(Inst->csh->mode, ARM_HasV8Ops))
2359 return MCDisassembler_Fail;
2360
2361 // Decoder can be called from DecodeTST, which does not check the full
2362 // encoding is valid.
2363 if (fieldFromInstruction_4(Insn, 20, 12) != 0xf11 ||
2364 fieldFromInstruction_4(Insn, 4, 4) != 0)
2365 return MCDisassembler_Fail;
2366
2367 if (fieldFromInstruction_4(Insn, 10, 10) != 0 ||
2368 fieldFromInstruction_4(Insn, 0, 4) != 0)
2369 S = MCDisassembler_SoftFail;
2370
2371 MCInst_setOpcode(Inst, ARM_SETPAN);
2372 MCOperand_CreateImm0(Inst, Imm);
2373
2374 return S;
2375}
2376
2377static DecodeStatus DecodeAddrModeImm12Operand(MCInst *Inst, unsigned Val,
2378 uint64_t Address, const void *Decoder)

Callers 1

DecodeTSTInstructionFunction · 0.85

Calls 3

ARM_getFeatureBitsFunction · 0.85
MCInst_setOpcodeFunction · 0.85
MCOperand_CreateImm0Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…