ack/plat/linuxppc/emu/emu.h
David Given 67efbb5f7f Do a bit of floating point stuff; added brk(); fixed a horrible bug where
stores with 16-bit displacements were storing the register number and not the
contents of the register.
2018-06-16 22:55:23 +02:00

38 lines
791 B
C

#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);
extern void dump_state(FILE* stream);
extern void single_step(void);
#endif