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

Function decodeSPE2Operands

arch/PowerPC/PPCDisassembler.c:484–501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

482}
483
484static DecodeStatus decodeSPE2Operands(MCInst *Inst, uint64_t Imm,
485 int64_t Address, const void *Decoder)
486{
487 // Decode the spe2disp field (imm, reg), which has the low 5-bits as the
488 // displacement with 2-byte aligned, and the next 5 bits as the register #.
489
490 uint64_t Base = Imm >> 5;
491 uint64_t Disp = Imm & 0x1F;
492
493 // assert(Base < 32 && "Invalid base register");
494 if (Base >= 32)
495 return MCDisassembler_Fail;
496
497 MCOperand_CreateImm0(Inst, Disp << 1);
498 MCOperand_CreateReg0(Inst, GP0Regs[Base]);
499
500 return MCDisassembler_Success;
501}
502
503static DecodeStatus decodeCRBitMOperand(MCInst *Inst, uint64_t Imm,
504 int64_t Address, const void *Decoder)

Callers

nothing calls this directly

Calls 2

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…