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

Function DecodeSwap

arch/ARM/ARMDisassembler.c:5441–5471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5439}
5440
5441static DecodeStatus DecodeSwap(MCInst *Inst, unsigned Insn,
5442 uint64_t Address, const void *Decoder)
5443{
5444 DecodeStatus S;
5445 unsigned Rt = fieldFromInstruction_4(Insn, 12, 4);
5446 unsigned Rt2 = fieldFromInstruction_4(Insn, 0, 4);
5447 unsigned Rn = fieldFromInstruction_4(Insn, 16, 4);
5448 unsigned pred = fieldFromInstruction_4(Insn, 28, 4);
5449
5450 if (pred == 0xF)
5451 return DecodeCPSInstruction(Inst, Insn, Address, Decoder);
5452
5453 S = MCDisassembler_Success;
5454
5455 if (Rt == Rn || Rn == Rt2)
5456 S = MCDisassembler_SoftFail;
5457
5458 if (!Check(&S, DecodeGPRnopcRegisterClass(Inst, Rt, Address, Decoder)))
5459 return MCDisassembler_Fail;
5460
5461 if (!Check(&S, DecodeGPRnopcRegisterClass(Inst, Rt2, Address, Decoder)))
5462 return MCDisassembler_Fail;
5463
5464 if (!Check(&S, DecodeGPRnopcRegisterClass(Inst, Rn, Address, Decoder)))
5465 return MCDisassembler_Fail;
5466
5467 if (!Check(&S, DecodePredicateOperand(Inst, pred, Address, Decoder)))
5468 return MCDisassembler_Fail;
5469
5470 return S;
5471}
5472
5473static DecodeStatus DecodeVCVTD(MCInst *Inst, unsigned Insn,
5474 uint64_t Address, const void *Decoder)

Callers

nothing calls this directly

Calls 4

DecodeCPSInstructionFunction · 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…