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

Function DecodeSPRRegListOperand

arch/ARM/ARMDisassembler.c:1370–1394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1368}
1369
1370static DecodeStatus DecodeSPRRegListOperand(MCInst *Inst, unsigned Val,
1371 uint64_t Address, const void *Decoder)
1372{
1373 DecodeStatus S = MCDisassembler_Success;
1374 unsigned i;
1375 unsigned Vd = fieldFromInstruction_4(Val, 8, 5);
1376 unsigned regs = fieldFromInstruction_4(Val, 0, 8);
1377
1378 // In case of unpredictable encoding, tweak the operands.
1379 if (regs == 0 || (Vd + regs) > 32) {
1380 regs = Vd + regs > 32 ? 32 - Vd : regs;
1381 regs = (1u > regs? 1u : regs);
1382 S = MCDisassembler_SoftFail;
1383 }
1384
1385 if (!Check(&S, DecodeSPRRegisterClass(Inst, Vd, Address, Decoder)))
1386 return MCDisassembler_Fail;
1387
1388 for (i = 0; i < (regs - 1); ++i) {
1389 if (!Check(&S, DecodeSPRRegisterClass(Inst, ++Vd, Address, Decoder)))
1390 return MCDisassembler_Fail;
1391 }
1392
1393 return S;
1394}
1395
1396static DecodeStatus DecodeDPRRegListOperand(MCInst *Inst, unsigned Val,
1397 uint64_t Address, const void *Decoder)

Callers

nothing calls this directly

Calls 2

DecodeSPRRegisterClassFunction · 0.85
CheckFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…