dingusppc/cpu/ppc/ppcdisasm.h

20 lines
492 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-25 04:40:00 +00:00
uint32_t instr_addr = 0;
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);
/** sign-extend an integer. */
#define SIGNEXT(x, sb) ((x) | (((x) & (1 << (sb))) ? ~((1 << (sb))-1) : 0))
#endif /* PPCDISASM_H */