dingusppc/cpu/ppc/ppcdisasm.h

22 lines
516 B
C
Raw Normal View History

2020-01-22 11:28:42 +00:00
#ifndef PPCDISASM_H
#define PPCDISASM_H
#include <cinttypes>
#include <string>
typedef struct PPCDisasmContext {
2020-01-22 11:28:42 +00:00
uint32_t instr_addr;
2020-01-22 11:28:42 +00:00
uint32_t instr_code;
std::string instr_str;
bool simplified; /* true if we should output simplified mnemonics */
} PPCDisasmContext;
std::string disassemble_single(PPCDisasmContext *ctx);
2020-02-12 21:58:24 +00:00
int test_ppc_disasm(void);
2020-01-22 11:28:42 +00:00
/** sign-extend an integer. */
#define SIGNEXT(x, sb) ((x) | (((x) & (1 << (sb))) ? ~((1 << (sb))-1) : 0))
#endif /* PPCDISASM_H */