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

Function DecodePredicateOperand

arch/ARM/ARMDisassembler.c:426–443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

424#include "ARMGenDisassemblerTables.inc"
425
426static DecodeStatus DecodePredicateOperand(MCInst *Inst, unsigned Val,
427 uint64_t Address, const void *Decoder)
428{
429 if (Val == 0xF) return MCDisassembler_Fail;
430
431 // AL predicate is not allowed on Thumb1 branches.
432 if (MCInst_getOpcode(Inst) == ARM_tBcc && Val == 0xE)
433 return MCDisassembler_Fail;
434
435 MCOperand_CreateImm0(Inst, Val);
436
437 if (Val == ARMCC_AL) {
438 MCOperand_CreateReg0(Inst, 0);
439 } else
440 MCOperand_CreateReg0(Inst, ARM_CPSR);
441
442 return MCDisassembler_Success;
443}
444
445#define GET_REGINFO_MC_DESC
446#include "ARMGenRegisterInfo.inc"

Callers 15

_ARM_getInstructionFunction · 0.85
DecodeCopMemInstructionFunction · 0.85
DecodeQADDInstructionFunction · 0.85
DecodeHINTInstructionFunction · 0.85
DecodeSMLAInstructionFunction · 0.85
DecodeTSTInstructionFunction · 0.85

Calls 3

MCInst_getOpcodeFunction · 0.85
MCOperand_CreateImm0Function · 0.85
MCOperand_CreateReg0Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…