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

Function DecodeLDRPreReg

arch/ARM/ARMDisassembler.c:4571–4600  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4569}
4570
4571static DecodeStatus DecodeLDRPreReg(MCInst *Inst, unsigned Insn,
4572 uint64_t Address, const void *Decoder)
4573{
4574 DecodeStatus S = MCDisassembler_Success;
4575 unsigned pred, Rm;
4576 unsigned Rn = fieldFromInstruction_4(Insn, 16, 4);
4577 unsigned Rt = fieldFromInstruction_4(Insn, 12, 4);
4578 unsigned imm = fieldFromInstruction_4(Insn, 0, 12);
4579 imm |= fieldFromInstruction_4(Insn, 16, 4) << 13;
4580 imm |= fieldFromInstruction_4(Insn, 23, 1) << 12;
4581 pred = fieldFromInstruction_4(Insn, 28, 4);
4582 Rm = fieldFromInstruction_4(Insn, 0, 4);
4583
4584 if (Rn == 0xF || Rn == Rt) S = MCDisassembler_SoftFail;
4585 if (Rm == 0xF) S = MCDisassembler_SoftFail;
4586
4587 if (!Check(&S, DecodeGPRRegisterClass(Inst, Rt, Address, Decoder)))
4588 return MCDisassembler_Fail;
4589
4590 if (!Check(&S, DecodeGPRRegisterClass(Inst, Rn, Address, Decoder)))
4591 return MCDisassembler_Fail;
4592
4593 if (!Check(&S, DecodeSORegMemOperand(Inst, imm, Address, Decoder)))
4594 return MCDisassembler_Fail;
4595
4596 if (!Check(&S, DecodePredicateOperand(Inst, pred, Address, Decoder)))
4597 return MCDisassembler_Fail;
4598
4599 return S;
4600}
4601
4602static DecodeStatus DecodeSTRPreImm(MCInst *Inst, unsigned Insn,
4603 uint64_t Address, const void *Decoder)

Callers

nothing calls this directly

Calls 4

DecodeSORegMemOperandFunction · 0.85
DecodePredicateOperandFunction · 0.85
CheckFunction · 0.70
DecodeGPRRegisterClassFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…