Check for UNPREDICTABLE predicated ESB instruction
| 2131 | |
| 2132 | // Check for UNPREDICTABLE predicated ESB instruction |
| 2133 | static 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 | |
| 2153 | static DecodeStatus DecodeCPSInstruction(MCInst *Inst, unsigned Insn, |
| 2154 | uint64_t Address, const void *Decoder) |
nothing calls this directly
no test coverage detected
searching dependent graphs…