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

Function DecodeHINTInstruction

arch/ARM/ARMDisassembler.c:2133–2151  ·  view source on GitHub ↗

Check for UNPREDICTABLE predicated ESB instruction

Source from the content-addressed store, hash-verified

2131
2132// Check for UNPREDICTABLE predicated ESB instruction
2133static DecodeStatus DecodeHINTInstruction(MCInst *Inst, unsigned Insn,
2134 uint64_t Address, const void *Decoder)
2135{
2136 unsigned pred = fieldFromInstruction_4(Insn, 28, 4);
2137 unsigned imm8 = fieldFromInstruction_4(Insn, 0, 8);
2138 DecodeStatus result = MCDisassembler_Success;
2139
2140 MCOperand_CreateImm0(Inst, imm8);
2141
2142 if (!Check(&result, DecodePredicateOperand(Inst, pred, Address, Decoder)))
2143 return MCDisassembler_Fail;
2144
2145 // ESB is unpredictable if pred != AL. Without the RAS extension, it is a NOP,
2146 // so all predicates should be allowed.
2147 if (imm8 == 0x10 && pred != 0xe && ARM_getFeatureBits(Inst->csh->mode, ARM_FeatureRAS))
2148 result = MCDisassembler_SoftFail;
2149
2150 return result;
2151}
2152
2153static DecodeStatus DecodeCPSInstruction(MCInst *Inst, unsigned Insn,
2154 uint64_t Address, const void *Decoder)

Callers

nothing calls this directly

Calls 4

MCOperand_CreateImm0Function · 0.85
DecodePredicateOperandFunction · 0.85
ARM_getFeatureBitsFunction · 0.85
CheckFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…