root / target-sparc / cpu.h @ 891b38e4
History | View | Annotate | Download (1.2 kB)
1 | 7a3f1944 | bellard | #ifndef CPU_SPARC_H
|
---|---|---|---|
2 | 7a3f1944 | bellard | #define CPU_SPARC_H
|
3 | 7a3f1944 | bellard | |
4 | 7a3f1944 | bellard | #include <setjmp.h> |
5 | 7a3f1944 | bellard | #include "config.h" |
6 | 7a3f1944 | bellard | #include "cpu-defs.h" |
7 | 7a3f1944 | bellard | |
8 | 7a3f1944 | bellard | /*#define EXCP_INTERRUPT 0x100*/
|
9 | 7a3f1944 | bellard | |
10 | 7a3f1944 | bellard | |
11 | 7a3f1944 | bellard | #define PSR_NEG (1<<23) |
12 | 7a3f1944 | bellard | #define PSR_ZERO (1<<22) |
13 | 7a3f1944 | bellard | #define PSR_OVF (1<<21) |
14 | 7a3f1944 | bellard | #define PSR_CARRY (1<<20) |
15 | 7a3f1944 | bellard | |
16 | 7a3f1944 | bellard | typedef struct CPUSPARCState { |
17 | 7a3f1944 | bellard | uint32_t gregs[8]; /* general registers */ |
18 | 7a3f1944 | bellard | uint32_t *regwptr; /* pointer to current register window */
|
19 | 7a3f1944 | bellard | double *regfptr; /* floating point registers */ |
20 | 7a3f1944 | bellard | uint32_t pc; /* program counter */
|
21 | 7a3f1944 | bellard | uint32_t npc; /* next program counter */
|
22 | 7a3f1944 | bellard | uint32_t sp; /* stack pointer */
|
23 | 7a3f1944 | bellard | uint32_t y; /* multiply/divide register */
|
24 | 7a3f1944 | bellard | uint32_t psr; /* processor state register */
|
25 | 7a3f1944 | bellard | uint32_t T2; |
26 | 7a3f1944 | bellard | jmp_buf jmp_env; |
27 | 7a3f1944 | bellard | int user_mode_only;
|
28 | 7a3f1944 | bellard | int exception_index;
|
29 | 7a3f1944 | bellard | int interrupt_index;
|
30 | 7a3f1944 | bellard | int interrupt_request;
|
31 | 7a3f1944 | bellard | struct TranslationBlock *current_tb;
|
32 | 7a3f1944 | bellard | void *opaque;
|
33 | 7a3f1944 | bellard | } CPUSPARCState; |
34 | 7a3f1944 | bellard | |
35 | 7a3f1944 | bellard | CPUSPARCState *cpu_sparc_init(void);
|
36 | 7a3f1944 | bellard | int cpu_sparc_exec(CPUSPARCState *s);
|
37 | 7a3f1944 | bellard | int cpu_sparc_close(CPUSPARCState *s);
|
38 | 7a3f1944 | bellard | |
39 | 7a3f1944 | bellard | struct siginfo;
|
40 | 7a3f1944 | bellard | int cpu_sparc_signal_handler(int hostsignum, struct siginfo *info, void *puc); |
41 | 7a3f1944 | bellard | void cpu_sparc_dump_state(CPUSPARCState *env, FILE *f, int flags); |
42 | 7a3f1944 | bellard | |
43 | 7a3f1944 | bellard | #define TARGET_PAGE_BITS 13 |
44 | 7a3f1944 | bellard | #include "cpu-all.h" |
45 | 7a3f1944 | bellard | |
46 | 7a3f1944 | bellard | #endif |