diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-09-30 20:36:07 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2003-09-30 20:36:07 +0000 |
commit | 7a3f194486ad5c8e21c96a19dee37b14a1057580 (patch) | |
tree | af45c762b3668a438e631ba939f8a573872435b6 /target-sparc/cpu.h | |
parent | 2c0262afa75d7d6cb68217f9a7587170ed3cd5b3 (diff) |
sparc emulation target (thanx to Thomas M. Ogrisegg)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@386 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sparc/cpu.h')
-rw-r--r-- | target-sparc/cpu.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h new file mode 100644 index 0000000000..350d7b719c --- /dev/null +++ b/target-sparc/cpu.h @@ -0,0 +1,46 @@ +#ifndef CPU_SPARC_H +#define CPU_SPARC_H + +#include <setjmp.h> +#include "config.h" +#include "cpu-defs.h" + +/*#define EXCP_INTERRUPT 0x100*/ + + +#define PSR_NEG (1<<23) +#define PSR_ZERO (1<<22) +#define PSR_OVF (1<<21) +#define PSR_CARRY (1<<20) + +typedef struct CPUSPARCState { + uint32_t gregs[8]; /* general registers */ + uint32_t *regwptr; /* pointer to current register window */ + double *regfptr; /* floating point registers */ + uint32_t pc; /* program counter */ + uint32_t npc; /* next program counter */ + uint32_t sp; /* stack pointer */ + uint32_t y; /* multiply/divide register */ + uint32_t psr; /* processor state register */ + uint32_t T2; + jmp_buf jmp_env; + int user_mode_only; + int exception_index; + int interrupt_index; + int interrupt_request; + struct TranslationBlock *current_tb; + void *opaque; +} CPUSPARCState; + +CPUSPARCState *cpu_sparc_init(void); +int cpu_sparc_exec(CPUSPARCState *s); +int cpu_sparc_close(CPUSPARCState *s); + +struct siginfo; +int cpu_sparc_signal_handler(int hostsignum, struct siginfo *info, void *puc); +void cpu_sparc_dump_state(CPUSPARCState *env, FILE *f, int flags); + +#define TARGET_PAGE_BITS 13 +#include "cpu-all.h" + +#endif |