3 #include "dyngen-exec.h"
7 struct CPUSPARCState
*env
;
9 register struct CPUSPARCState
*env
asm(AREG0
);
16 #define REGWPTR env->regwptr
18 #if defined(__sparc__)
19 register uint32_t T0
asm(AREG3
);
20 register uint32_t T1
asm(AREG2
);
22 register uint32_t T0
asm(AREG1
);
23 register uint32_t T1
asm(AREG2
);
26 #undef REG_REGWPTR // Broken
28 #if defined(__sparc__)
29 register uint32_t *REGWPTR
asm(AREG4
);
31 register uint32_t *REGWPTR
asm(AREG3
);
36 #if defined(__sparc__)
37 register uint32_t T2
asm(AREG0
);
39 register uint32_t T2
asm(AREG4
);
47 #define REGWPTR env->regwptr
48 #if defined(__sparc__)
49 register uint32_t T2
asm(AREG0
);
51 register uint32_t T2
asm(AREG3
);
57 #define FT0 (env->ft0)
58 #define FT1 (env->ft1)
59 #define DT0 (env->dt0)
60 #define DT1 (env->dt1)
66 void cpu_unlock(void);
67 void cpu_loop_exit(void);
68 void helper_flush(target_ulong addr
);
69 void helper_ld_asi(int asi
, int size
, int sign
);
70 void helper_st_asi(int asi
, int size
, int sign
);
71 void helper_rett(void);
72 void helper_ldfsr(void);
73 void set_cwp(int new_cwp
);
83 void do_fcmps_fcc1(void);
84 void do_fcmpd_fcc1(void);
85 void do_fcmps_fcc2(void);
86 void do_fcmpd_fcc2(void);
87 void do_fcmps_fcc3(void);
88 void do_fcmpd_fcc3(void);
94 void do_ldd_kernel(target_ulong addr
);
95 void do_ldd_user(target_ulong addr
);
96 void do_ldd_raw(target_ulong addr
);
97 void do_interrupt(int intno
);
98 void raise_exception(int tt
);
99 void memcpy32(target_ulong
*dst
, const target_ulong
*src
);
100 target_ulong
mmu_probe(CPUState
*env
, target_ulong address
, int mmulev
);
101 void dump_mmu(CPUState
*env
);
106 /* XXX: move that to a generic header */
107 #if !defined(CONFIG_USER_ONLY)
108 #include "softmmu_exec.h"
109 #endif /* !defined(CONFIG_USER_ONLY) */
111 static inline void env_to_regs(void)
113 #if defined(reg_REGWPTR)
114 REGWPTR
= env
->regbase
+ (env
->cwp
* 16);
115 env
->regwptr
= REGWPTR
;
119 static inline void regs_to_env(void)
123 int cpu_sparc_handle_mmu_fault(CPUState
*env
, target_ulong address
, int rw
,
124 int is_user
, int is_softmmu
);