|
|
1.1 root 1: #ifndef EXEC_SPARC_H
2: #define EXEC_SPARC_H 1
3: #include "dyngen-exec.h"
4: #include "config.h"
5:
6: register struct CPUSPARCState *env asm(AREG0);
7: #ifdef TARGET_SPARC64
8: #define T0 (env->t0)
9: #define T1 (env->t1)
10: #define T2 (env->t2)
11: #define REGWPTR env->regwptr
12: #else
13: register uint32_t T0 asm(AREG1);
14: register uint32_t T1 asm(AREG2);
15:
16: #undef REG_REGWPTR // Broken
17: #ifdef REG_REGWPTR
18: register uint32_t *REGWPTR asm(AREG3);
19: #define reg_REGWPTR
20:
21: #ifdef AREG4
22: register uint32_t T2 asm(AREG4);
23: #define reg_T2
24: #else
25: #define T2 (env->t2)
26: #endif
27:
28: #else
29: #define REGWPTR env->regwptr
30: register uint32_t T2 asm(AREG3);
31: #define reg_T2
32: #endif
33: #endif
34:
35: #define FT0 (env->ft0)
36: #define FT1 (env->ft1)
37: #define DT0 (env->dt0)
38: #define DT1 (env->dt1)
39:
40: #include "cpu.h"
41: #include "exec-all.h"
42:
43: void cpu_lock(void);
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);
52: void do_fitos(void);
53: void do_fitod(void);
54: void do_fabss(void);
55: void do_fsqrts(void);
56: void do_fsqrtd(void);
57: void do_fcmps(void);
58: void do_fcmpd(void);
59: #ifdef TARGET_SPARC64
60: void do_fabsd(void);
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);
67: void do_popc();
68: void do_wrpstate();
69: void do_done();
70: void do_retry();
71: #endif
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);
80: void helper_debug();
81: void do_wrpsr();
82: void do_rdpsr();
83:
84: /* XXX: move that to a generic header */
85: #if !defined(CONFIG_USER_ONLY)
86:
87: #define ldul_user ldl_user
88: #define ldul_kernel ldl_kernel
89:
90: #define ACCESS_TYPE 0
91: #define MEMSUFFIX _kernel
92: #define DATA_SIZE 1
93: #include "softmmu_header.h"
94:
95: #define DATA_SIZE 2
96: #include "softmmu_header.h"
97:
98: #define DATA_SIZE 4
99: #include "softmmu_header.h"
100:
101: #define DATA_SIZE 8
102: #include "softmmu_header.h"
103: #undef ACCESS_TYPE
104: #undef MEMSUFFIX
105:
106: #define ACCESS_TYPE 1
107: #define MEMSUFFIX _user
108: #define DATA_SIZE 1
109: #include "softmmu_header.h"
110:
111: #define DATA_SIZE 2
112: #include "softmmu_header.h"
113:
114: #define DATA_SIZE 4
115: #include "softmmu_header.h"
116:
117: #define DATA_SIZE 8
118: #include "softmmu_header.h"
119: #undef ACCESS_TYPE
120: #undef MEMSUFFIX
121:
122: /* these access are slower, they must be as rare as possible */
123: #define ACCESS_TYPE 2
124: #define MEMSUFFIX _data
125: #define DATA_SIZE 1
126: #include "softmmu_header.h"
127:
128: #define DATA_SIZE 2
129: #include "softmmu_header.h"
130:
131: #define DATA_SIZE 4
132: #include "softmmu_header.h"
133:
134: #define DATA_SIZE 8
135: #include "softmmu_header.h"
136: #undef ACCESS_TYPE
137: #undef MEMSUFFIX
138:
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)
145:
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)
150:
151: #endif /* !defined(CONFIG_USER_ONLY) */
152:
153: static inline void env_to_regs(void)
154: {
155: }
156:
157: static inline void regs_to_env(void)
158: {
159: }
160:
161: int cpu_sparc_handle_mmu_fault(CPUState *env, target_ulong address, int rw,
162: int is_user, int is_softmmu);
163:
164: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.