ack/plat/linuxppc/emu/emu.h

38 lines
791 B
C
Raw Permalink Normal View History

#ifndef EMU_H
#define EMU_H
extern void fatal(char* fmt, ...);
typedef struct
{
uint32_t gpr[32];
uint64_t fpr[32];
uint32_t cr;
uint32_t ctr;
uint32_t lr;
uint32_t xer;
uint32_t fpscr;
uint32_t cia;
uint32_t nia;
}
cpu_t;
extern cpu_t cpu;
extern uint32_t read_byte(uint32_t address);
extern uint32_t read_word(uint32_t address);
extern uint32_t read_long(uint32_t address);
extern uint64_t read_double(uint32_t address);
extern void write_byte(uint32_t address, uint32_t value);
extern void write_word(uint32_t address, uint32_t value);
extern void write_long(uint32_t address, uint32_t value);
extern void write_double(uint32_t address, uint64_t value);
extern void system_call(uint8_t trapno);
2018-06-14 11:41:21 +00:00
extern void dump_state(FILE* stream);
extern void single_step(void);
#endif