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

Function decodeMemRIX16Operands

arch/PowerPC/PPCDisassembler.c:427–444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425}
426
427static DecodeStatus decodeMemRIX16Operands(MCInst *Inst, uint64_t Imm,
428 int64_t Address, const void *Decoder)
429{
430 // Decode the memrix16 field (imm, reg), which has the low 12-bits as the
431 // displacement with 16-byte aligned, and the next 5 bits as the register #.
432
433 uint64_t Base = Imm >> 12;
434 uint64_t Disp = Imm & 0xFFF;
435
436 // assert(Base < 32 && "Invalid base register");
437 if (Base >= 32)
438 return MCDisassembler_Fail;
439
440 MCOperand_CreateImm0(Inst, SignExtend64(Disp << 4, 16));
441 MCOperand_CreateReg0(Inst, GP0Regs[Base]);
442
443 return MCDisassembler_Success;
444}
445
446static DecodeStatus decodeSPE8Operands(MCInst *Inst, uint64_t Imm,
447 int64_t Address, const void *Decoder)

Callers

nothing calls this directly

Calls 3

MCOperand_CreateImm0Function · 0.85
SignExtend64Function · 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…