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

Function decodeSPE8Operands

arch/PowerPC/PPCDisassembler.c:446–463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

444}
445
446static DecodeStatus decodeSPE8Operands(MCInst *Inst, uint64_t Imm,
447 int64_t Address, const void *Decoder)
448{
449 // Decode the spe8disp field (imm, reg), which has the low 5-bits as the
450 // displacement with 8-byte aligned, and the next 5 bits as the register #.
451
452 uint64_t Base = Imm >> 5;
453 uint64_t Disp = Imm & 0x1F;
454
455 // assert(Base < 32 && "Invalid base register");
456 if (Base >= 32)
457 return MCDisassembler_Fail;
458
459 MCOperand_CreateImm0(Inst, Disp << 3);
460 MCOperand_CreateReg0(Inst, GP0Regs[Base]);
461
462 return MCDisassembler_Success;
463}
464
465static DecodeStatus decodeSPE4Operands(MCInst *Inst, uint64_t Imm,
466 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…