root / target-sparc / exec.h @ 4ad5b06d
History | View | Annotate | Download (2.6 kB)
1 | 7a3f1944 | bellard | #ifndef EXEC_SPARC_H
|
---|---|---|---|
2 | 7a3f1944 | bellard | #define EXEC_SPARC_H 1 |
3 | 7a3f1944 | bellard | #include "dyngen-exec.h" |
4 | 3475187d | bellard | #include "config.h" |
5 | 7a3f1944 | bellard | |
6 | 01d6a890 | ths | #if defined(__sparc__)
|
7 | 01d6a890 | ths | struct CPUSPARCState *env;
|
8 | 01d6a890 | ths | #else
|
9 | 7a3f1944 | bellard | register struct CPUSPARCState *env asm(AREG0); |
10 | 01d6a890 | ths | #endif
|
11 | 01d6a890 | ths | |
12 | af7bf89b | bellard | #ifdef TARGET_SPARC64
|
13 | af7bf89b | bellard | #define T0 (env->t0)
|
14 | af7bf89b | bellard | #define T1 (env->t1)
|
15 | af7bf89b | bellard | #define T2 (env->t2)
|
16 | 3475187d | bellard | #define REGWPTR env->regwptr
|
17 | af7bf89b | bellard | #else
|
18 | 01d6a890 | ths | #if defined(__sparc__)
|
19 | 01d6a890 | ths | register uint32_t T0 asm(AREG3); |
20 | 01d6a890 | ths | register uint32_t T1 asm(AREG2); |
21 | 01d6a890 | ths | #else
|
22 | 7a3f1944 | bellard | register uint32_t T0 asm(AREG1); |
23 | 7a3f1944 | bellard | register uint32_t T1 asm(AREG2); |
24 | 01d6a890 | ths | #endif
|
25 | 3475187d | bellard | |
26 | 3475187d | bellard | #undef REG_REGWPTR // Broken |
27 | 3475187d | bellard | #ifdef REG_REGWPTR
|
28 | 01d6a890 | ths | #if defined(__sparc__)
|
29 | 01d6a890 | ths | register uint32_t *REGWPTR asm(AREG4); |
30 | 01d6a890 | ths | #else
|
31 | 3475187d | bellard | register uint32_t *REGWPTR asm(AREG3); |
32 | 01d6a890 | ths | #endif
|
33 | 3475187d | bellard | #define reg_REGWPTR
|
34 | 3475187d | bellard | |
35 | 3475187d | bellard | #ifdef AREG4
|
36 | 01d6a890 | ths | #if defined(__sparc__)
|
37 | 01d6a890 | ths | register uint32_t T2 asm(AREG0); |
38 | 01d6a890 | ths | #else
|
39 | 3475187d | bellard | register uint32_t T2 asm(AREG4); |
40 | 01d6a890 | ths | #endif
|
41 | 3475187d | bellard | #define reg_T2
|
42 | 3475187d | bellard | #else
|
43 | 3475187d | bellard | #define T2 (env->t2)
|
44 | 3475187d | bellard | #endif
|
45 | 3475187d | bellard | |
46 | 3475187d | bellard | #else
|
47 | 3475187d | bellard | #define REGWPTR env->regwptr
|
48 | 01d6a890 | ths | #if defined(__sparc__)
|
49 | 01d6a890 | ths | register uint32_t T2 asm(AREG0); |
50 | 01d6a890 | ths | #else
|
51 | 7a3f1944 | bellard | register uint32_t T2 asm(AREG3); |
52 | 01d6a890 | ths | #endif
|
53 | 3475187d | bellard | #define reg_T2
|
54 | 3475187d | bellard | #endif
|
55 | af7bf89b | bellard | #endif
|
56 | 3475187d | bellard | |
57 | e8af50a3 | bellard | #define FT0 (env->ft0)
|
58 | e8af50a3 | bellard | #define FT1 (env->ft1)
|
59 | e8af50a3 | bellard | #define DT0 (env->dt0)
|
60 | e8af50a3 | bellard | #define DT1 (env->dt1)
|
61 | 7a3f1944 | bellard | |
62 | 7a3f1944 | bellard | #include "cpu.h" |
63 | 7a3f1944 | bellard | #include "exec-all.h" |
64 | 7a3f1944 | bellard | |
65 | 7a3f1944 | bellard | void cpu_lock(void); |
66 | 7a3f1944 | bellard | void cpu_unlock(void); |
67 | 7a3f1944 | bellard | void cpu_loop_exit(void); |
68 | 658138bc | bellard | void helper_flush(target_ulong addr);
|
69 | e8af50a3 | bellard | void helper_ld_asi(int asi, int size, int sign); |
70 | e8af50a3 | bellard | void helper_st_asi(int asi, int size, int sign); |
71 | e8af50a3 | bellard | void helper_rett(void); |
72 | 8d5f07fa | bellard | void helper_ldfsr(void); |
73 | e8af50a3 | bellard | void set_cwp(int new_cwp); |
74 | a0c4cb4a | bellard | void do_fitos(void); |
75 | a0c4cb4a | bellard | void do_fitod(void); |
76 | e8af50a3 | bellard | void do_fabss(void); |
77 | e8af50a3 | bellard | void do_fsqrts(void); |
78 | e8af50a3 | bellard | void do_fsqrtd(void); |
79 | e8af50a3 | bellard | void do_fcmps(void); |
80 | e8af50a3 | bellard | void do_fcmpd(void); |
81 | 3475187d | bellard | #ifdef TARGET_SPARC64
|
82 | 3475187d | bellard | void do_fabsd(void); |
83 | 3475187d | bellard | void do_fcmps_fcc1(void); |
84 | 3475187d | bellard | void do_fcmpd_fcc1(void); |
85 | 3475187d | bellard | void do_fcmps_fcc2(void); |
86 | 3475187d | bellard | void do_fcmpd_fcc2(void); |
87 | 3475187d | bellard | void do_fcmps_fcc3(void); |
88 | 3475187d | bellard | void do_fcmpd_fcc3(void); |
89 | 3475187d | bellard | void do_popc();
|
90 | 83469015 | bellard | void do_wrpstate();
|
91 | 83469015 | bellard | void do_done();
|
92 | 83469015 | bellard | void do_retry();
|
93 | 3475187d | bellard | #endif
|
94 | af7bf89b | bellard | void do_ldd_kernel(target_ulong addr);
|
95 | af7bf89b | bellard | void do_ldd_user(target_ulong addr);
|
96 | af7bf89b | bellard | void do_ldd_raw(target_ulong addr);
|
97 | 878d3096 | bellard | void do_interrupt(int intno); |
98 | e8af50a3 | bellard | void raise_exception(int tt); |
99 | af7bf89b | bellard | void memcpy32(target_ulong *dst, const target_ulong *src); |
100 | ee5bbe38 | bellard | target_ulong mmu_probe(CPUState *env, target_ulong address, int mmulev);
|
101 | ee5bbe38 | bellard | void dump_mmu(CPUState *env);
|
102 | e80cfcfc | bellard | void helper_debug();
|
103 | af7bf89b | bellard | void do_wrpsr();
|
104 | af7bf89b | bellard | void do_rdpsr();
|
105 | e8af50a3 | bellard | |
106 | e8af50a3 | bellard | /* XXX: move that to a generic header */
|
107 | e8af50a3 | bellard | #if !defined(CONFIG_USER_ONLY)
|
108 | a9049a07 | bellard | #include "softmmu_exec.h" |
109 | e8af50a3 | bellard | #endif /* !defined(CONFIG_USER_ONLY) */ |
110 | 0d1a29f9 | bellard | |
111 | 0d1a29f9 | bellard | static inline void env_to_regs(void) |
112 | 0d1a29f9 | bellard | { |
113 | aea3ce4c | bellard | #if defined(reg_REGWPTR)
|
114 | aea3ce4c | bellard | REGWPTR = env->regbase + (env->cwp * 16);
|
115 | aea3ce4c | bellard | env->regwptr = REGWPTR; |
116 | aea3ce4c | bellard | #endif
|
117 | 0d1a29f9 | bellard | } |
118 | 0d1a29f9 | bellard | |
119 | 0d1a29f9 | bellard | static inline void regs_to_env(void) |
120 | 0d1a29f9 | bellard | { |
121 | 0d1a29f9 | bellard | } |
122 | 0d1a29f9 | bellard | |
123 | 9d893301 | bellard | int cpu_sparc_handle_mmu_fault(CPUState *env, target_ulong address, int rw, |
124 | 9d893301 | bellard | int is_user, int is_softmmu); |
125 | 9d893301 | bellard | |
126 | 7a3f1944 | bellard | #endif |