Statistics
| Branch: | Revision:

root / target-sparc / exec.h @ ee5bbe38

History | View | Annotate | Download (3.3 kB)

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
#endif
69
void do_ldd_kernel(target_ulong addr);
70
void do_ldd_user(target_ulong addr);
71
void do_ldd_raw(target_ulong addr);
72
void do_interrupt(int intno);
73
void raise_exception(int tt);
74
void memcpy32(target_ulong *dst, const target_ulong *src);
75
target_ulong mmu_probe(CPUState *env, target_ulong address, int mmulev);
76
void dump_mmu(CPUState *env);
77
void helper_debug();
78
void do_wrpsr();
79
void do_rdpsr();
80

    
81
/* XXX: move that to a generic header */
82
#if !defined(CONFIG_USER_ONLY)
83

    
84
#define ldul_user ldl_user
85
#define ldul_kernel ldl_kernel
86

    
87
#define ACCESS_TYPE 0
88
#define MEMSUFFIX _kernel
89
#define DATA_SIZE 1
90
#include "softmmu_header.h"
91

    
92
#define DATA_SIZE 2
93
#include "softmmu_header.h"
94

    
95
#define DATA_SIZE 4
96
#include "softmmu_header.h"
97

    
98
#define DATA_SIZE 8
99
#include "softmmu_header.h"
100
#undef ACCESS_TYPE
101
#undef MEMSUFFIX
102

    
103
#define ACCESS_TYPE 1
104
#define MEMSUFFIX _user
105
#define DATA_SIZE 1
106
#include "softmmu_header.h"
107

    
108
#define DATA_SIZE 2
109
#include "softmmu_header.h"
110

    
111
#define DATA_SIZE 4
112
#include "softmmu_header.h"
113

    
114
#define DATA_SIZE 8
115
#include "softmmu_header.h"
116
#undef ACCESS_TYPE
117
#undef MEMSUFFIX
118

    
119
/* these access are slower, they must be as rare as possible */
120
#define ACCESS_TYPE 2
121
#define MEMSUFFIX _data
122
#define DATA_SIZE 1
123
#include "softmmu_header.h"
124

    
125
#define DATA_SIZE 2
126
#include "softmmu_header.h"
127

    
128
#define DATA_SIZE 4
129
#include "softmmu_header.h"
130

    
131
#define DATA_SIZE 8
132
#include "softmmu_header.h"
133
#undef ACCESS_TYPE
134
#undef MEMSUFFIX
135

    
136
#define ldub(p) ldub_data(p)
137
#define ldsb(p) ldsb_data(p)
138
#define lduw(p) lduw_data(p)
139
#define ldsw(p) ldsw_data(p)
140
#define ldl(p) ldl_data(p)
141
#define ldq(p) ldq_data(p)
142

    
143
#define stb(p, v) stb_data(p, v)
144
#define stw(p, v) stw_data(p, v)
145
#define stl(p, v) stl_data(p, v)
146
#define stq(p, v) stq_data(p, v)
147

    
148
#endif /* !defined(CONFIG_USER_ONLY) */
149

    
150
static inline void env_to_regs(void)
151
{
152
}
153

    
154
static inline void regs_to_env(void)
155
{
156
}
157

    
158
int cpu_sparc_handle_mmu_fault(CPUState *env, target_ulong address, int rw,
159
                               int is_user, int is_softmmu);
160

    
161
#endif