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

Function DecodeLDR

arch/ARM/ARMDisassembler.c:5653–5684  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5651}
5652
5653static DecodeStatus DecodeLDR(MCInst *Inst, unsigned Val,
5654 uint64_t Address, const void *Decoder)
5655{
5656 DecodeStatus S = MCDisassembler_Success;
5657 unsigned Cond;
5658 unsigned Rn = fieldFromInstruction_4(Val, 16, 4);
5659 unsigned Rt = fieldFromInstruction_4(Val, 12, 4);
5660 unsigned Rm = fieldFromInstruction_4(Val, 0, 4);
5661
5662 Rm |= (fieldFromInstruction_4(Val, 23, 1) << 4);
5663 Cond = fieldFromInstruction_4(Val, 28, 4);
5664
5665 if (fieldFromInstruction_4(Val, 8, 4) != 0 || Rn == Rt)
5666 S = MCDisassembler_SoftFail;
5667
5668 if (!Check(&S, DecodeGPRnopcRegisterClass(Inst, Rt, Address, Decoder)))
5669 return MCDisassembler_Fail;
5670
5671 if (!Check(&S, DecodeGPRnopcRegisterClass(Inst, Rn, Address, Decoder)))
5672 return MCDisassembler_Fail;
5673
5674 if (!Check(&S, DecodeAddrMode7Operand(Inst, Rn, Address, Decoder)))
5675 return MCDisassembler_Fail;
5676
5677 if (!Check(&S, DecodePostIdxReg(Inst, Rm, Address, Decoder)))
5678 return MCDisassembler_Fail;
5679
5680 if (!Check(&S, DecodePredicateOperand(Inst, Cond, Address, Decoder)))
5681 return MCDisassembler_Fail;
5682
5683 return S;
5684}
5685
5686static DecodeStatus DecoderForMRRC2AndMCRR2(MCInst *Inst, unsigned Val,
5687 uint64_t Address, const void *Decoder)

Callers

nothing calls this directly

Calls 5

DecodeAddrMode7OperandFunction · 0.85
DecodePostIdxRegFunction · 0.85
DecodePredicateOperandFunction · 0.85
CheckFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…