summaryrefslogtreecommitdiff
path: root/arch/powerpc/decode/priv.h
diff options
context:
space:
mode:
authorGalen Williamson <galen@vector35.com>2025-06-29 11:23:58 -0400
committerGalen Williamson <galen@vector35.com>2025-06-29 18:28:48 -0400
commite8206bc27e1633c7e4c99907f43bf67d2f200cd5 (patch)
tree2315bec284e9bb692a0eb8986578fe18e2289d23 /arch/powerpc/decode/priv.h
parent91f1eccb6c41a7ef60fd66387ffae075f88141a4 (diff)
[powerpc] Full merge of PowerPC disassembler PRs, including:
* Remove dependency on capstone for PowerPC disassembly #6292 * Add support for PowerPC VLE instruction set #6740 * Add support for paired-single instructions #6821 * Various post-merge fixes and tweaks to disassembly and lifting * Removal of dependence on capstone for assembler's scoring mechanism (capstone currently disabled, but not removed from codebase yet)
Diffstat (limited to 'arch/powerpc/decode/priv.h')
-rw-r--r--arch/powerpc/decode/priv.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/arch/powerpc/decode/priv.h b/arch/powerpc/decode/priv.h
new file mode 100644
index 00000000..8cc8b297
--- /dev/null
+++ b/arch/powerpc/decode/priv.h
@@ -0,0 +1,54 @@
+#include <inttypes.h>
+
+#include "decode.h"
+
+int32_t sign_extend(uint32_t x, unsigned numBits);
+
+uint32_t GetA(uint32_t word32);
+uint32_t GetB(uint32_t word32);
+uint32_t GetC(uint32_t word32);
+uint32_t GetD(uint32_t word32);
+uint32_t GetS(uint32_t word32);
+
+uint32_t GetBI(uint32_t word32);
+uint32_t GetBO(uint32_t word32);
+
+uint32_t GetVsxA(uint32_t word32);
+uint32_t GetVsxB(uint32_t word32);
+uint32_t GetVsxC(uint32_t word32);
+uint32_t GetVsxD(uint32_t word32);
+
+uint32_t GetSpecialRegisterCommon(uint32_t word32);
+
+uint32_t GetME(uint32_t word32);
+uint32_t GetMB(uint32_t word32);
+uint32_t GetSH(uint32_t word32);
+uint32_t GetSH64(uint32_t word32);
+uint32_t GetMX64(uint32_t word32);
+
+void FillOperands32(Instruction* instruction, uint32_t word32, uint64_t address);
+
+Register Gpr(uint32_t value);
+Register Crf(uint32_t value);
+void PushUIMMValue(Instruction* instruction, uint64_t uimm);
+void PushSIMMValue(Instruction* instruction, int32_t simm);
+void PushRegister(Instruction* instruction, OperandClass cls, Register reg);
+void PushRA(Instruction* instruction, uint32_t word32);
+void PushRB(Instruction* instruction, uint32_t word32);
+void PushRD(Instruction* instruction, uint32_t word32);
+void PushRS(Instruction* instruction, uint32_t word32);
+void PushCRBitA(Instruction* instruction, uint32_t word32);
+void PushCRBitB(Instruction* instruction, uint32_t word32);
+void PushCRBitD(Instruction* instruction, uint32_t word32);
+void PushCRFD(Instruction* instruction, uint32_t word32);
+void PushCRFDImplyCR0(Instruction* instruction, uint32_t word32);
+void PushCRFS(Instruction* instruction, uint32_t word32);
+void PushMem(Instruction* instruction, OperandClass cls, Register reg, int32_t offset);
+void PushMemRA(Instruction* instruction, uint32_t word32);
+void PushLabel(Instruction* instruction, uint64_t address);
+
+void CopyOperand(Operand* dst, const Operand* src);
+
+InstructionId Decode0x04(uint32_t word32, uint32_t decodeFlags);
+InstructionId Decode0x1F(uint32_t word32, uint32_t decodeFlags);
+InstructionId VleTranslateMnemonic(InstructionId id);