3 #include "dyngen-exec.h"
6 register struct CPUSPARCState *env asm(AREG0);
11 #define REGWPTR env->regwptr
13 register uint32_t T0 asm(AREG1);
14 register uint32_t T1 asm(AREG2);
16 #undef REG_REGWPTR // Broken
18 register uint32_t *REGWPTR asm(AREG3);
22 register uint32_t T2 asm(AREG4);
29 #define REGWPTR env->regwptr
30 register uint32_t T2 asm(AREG3);
35 #define FT0 (env->ft0)
36 #define FT1 (env->ft1)
37 #define DT0 (env->dt0)
38 #define DT1 (env->dt1)
44 void cpu_unlock(void);
45 void cpu_loop_exit(void);
46 void helper_flush(target_ulong addr);
47 void helper_ld_asi(int asi, int size, int sign);
48 void helper_st_asi(int asi, int size, int sign);
49 void helper_rett(void);
50 void helper_ldfsr(void);
51 void set_cwp(int new_cwp);
61 void do_fcmps_fcc1(void);
62 void do_fcmpd_fcc1(void);
63 void do_fcmps_fcc2(void);
64 void do_fcmpd_fcc2(void);
65 void do_fcmps_fcc3(void);
66 void do_fcmpd_fcc3(void);
72 void do_ldd_kernel(target_ulong addr);
73 void do_ldd_user(target_ulong addr);
74 void do_ldd_raw(target_ulong addr);
75 void do_interrupt(int intno);
76 void raise_exception(int tt);
77 void memcpy32(target_ulong *dst, const target_ulong *src);
78 target_ulong mmu_probe(CPUState *env, target_ulong address, int mmulev);
79 void dump_mmu(CPUState *env);
84 /* XXX: move that to a generic header */
85 #if !defined(CONFIG_USER_ONLY)
87 #define ldul_user ldl_user
88 #define ldul_kernel ldl_kernel
91 #define MEMSUFFIX _kernel
93 #include "softmmu_header.h"
96 #include "softmmu_header.h"
99 #include "softmmu_header.h"
102 #include "softmmu_header.h"
106 #define ACCESS_TYPE 1
107 #define MEMSUFFIX _user
109 #include "softmmu_header.h"
112 #include "softmmu_header.h"
115 #include "softmmu_header.h"
118 #include "softmmu_header.h"
122 /* these access are slower, they must be as rare as possible */
123 #define ACCESS_TYPE 2
124 #define MEMSUFFIX _data
126 #include "softmmu_header.h"
129 #include "softmmu_header.h"
132 #include "softmmu_header.h"
135 #include "softmmu_header.h"
139 #define ldub(p) ldub_data(p)
140 #define ldsb(p) ldsb_data(p)
141 #define lduw(p) lduw_data(p)
142 #define ldsw(p) ldsw_data(p)
143 #define ldl(p) ldl_data(p)
144 #define ldq(p) ldq_data(p)
146 #define stb(p, v) stb_data(p, v)
147 #define stw(p, v) stw_data(p, v)
148 #define stl(p, v) stl_data(p, v)
149 #define stq(p, v) stq_data(p, v)
151 #endif /* !defined(CONFIG_USER_ONLY) */
153 static inline void env_to_regs(void)
157 static inline void regs_to_env(void)
161 int cpu_sparc_handle_mmu_fault(CPUState *env, target_ulong address, int rw,
162 int is_user, int is_softmmu);