root / target-sparc / helper.h @ 5439779e
History | View | Annotate | Download (6.9 kB)
1 | c9e03d8f | blueswir1 | #ifndef DEF_HELPER
|
---|---|---|---|
2 | c9e03d8f | blueswir1 | #define DEF_HELPER(ret, name, params) ret name params;
|
3 | c9e03d8f | blueswir1 | #endif
|
4 | 1a2fb1c0 | blueswir1 | |
5 | 1a2fb1c0 | blueswir1 | #ifndef TARGET_SPARC64
|
6 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_rett, (void)) |
7 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_wrpsr, (target_ulong new_psr))
|
8 | c9e03d8f | blueswir1 | DEF_HELPER(target_ulong, helper_rdpsr, (void))
|
9 | 1a2fb1c0 | blueswir1 | #else
|
10 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_wrpstate, (target_ulong new_state))
|
11 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_done, (void)) |
12 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_retry, (void)) |
13 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_flushw, (void)) |
14 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_saved, (void)) |
15 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_restored, (void)) |
16 | c9e03d8f | blueswir1 | DEF_HELPER(target_ulong, helper_rdccr, (void))
|
17 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_wrccr, (target_ulong new_ccr))
|
18 | c9e03d8f | blueswir1 | DEF_HELPER(target_ulong, helper_rdcwp, (void))
|
19 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_wrcwp, (target_ulong new_cwp))
|
20 | c9e03d8f | blueswir1 | DEF_HELPER(target_ulong, helper_array8, (target_ulong pixel_addr, \ |
21 | c9e03d8f | blueswir1 | target_ulong cubesize)) |
22 | c9e03d8f | blueswir1 | DEF_HELPER(target_ulong, helper_alignaddr, (target_ulong addr, \ |
23 | c9e03d8f | blueswir1 | target_ulong offset)) |
24 | c9e03d8f | blueswir1 | DEF_HELPER(target_ulong, helper_popc, (target_ulong val)) |
25 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_ldf_asi, (target_ulong addr, int asi, int size, int rd)) |
26 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_stf_asi, (target_ulong addr, int asi, int size, int rd)) |
27 | c9e03d8f | blueswir1 | DEF_HELPER(target_ulong, helper_cas_asi, (target_ulong addr, \ |
28 | c9e03d8f | blueswir1 | target_ulong val1, \ |
29 | c9e03d8f | blueswir1 | target_ulong val2, uint32_t asi)) |
30 | c9e03d8f | blueswir1 | DEF_HELPER(target_ulong, helper_casx_asi, (target_ulong addr, \ |
31 | c9e03d8f | blueswir1 | target_ulong val1, \ |
32 | c9e03d8f | blueswir1 | target_ulong val2, uint32_t asi)) |
33 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_tick_set_count, (void *opaque, uint64_t count)) |
34 | c9e03d8f | blueswir1 | DEF_HELPER(uint64_t, helper_tick_get_count, (void *opaque))
|
35 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_tick_set_limit, (void *opaque, uint64_t limit)) |
36 | c9e03d8f | blueswir1 | #endif
|
37 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_trap, (target_ulong nb_trap))
|
38 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_trapcc, (target_ulong nb_trap, target_ulong do_trap))
|
39 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_check_align, (target_ulong addr, uint32_t align))
|
40 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_debug, (void)) |
41 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_save, (void)) |
42 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_restore, (void)) |
43 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_flush, (target_ulong addr))
|
44 | c9e03d8f | blueswir1 | DEF_HELPER(target_ulong, helper_udiv, (target_ulong a, target_ulong b)) |
45 | c9e03d8f | blueswir1 | DEF_HELPER(target_ulong, helper_sdiv, (target_ulong a, target_ulong b)) |
46 | c9e03d8f | blueswir1 | DEF_HELPER(uint64_t, helper_pack64, (target_ulong high, target_ulong low)) |
47 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_stdf, (target_ulong addr, int mem_idx)) |
48 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_lddf, (target_ulong addr, int mem_idx)) |
49 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_ldqf, (target_ulong addr, int mem_idx)) |
50 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_stqf, (target_ulong addr, int mem_idx)) |
51 | c9e03d8f | blueswir1 | #if !defined(CONFIG_USER_ONLY) || defined(TARGET_SPARC64)
|
52 | c9e03d8f | blueswir1 | DEF_HELPER(uint64_t, helper_ld_asi, (target_ulong addr, int asi, int size, \ |
53 | c9e03d8f | blueswir1 | int sign))
|
54 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_st_asi, (target_ulong addr, uint64_t val, int asi, \ |
55 | c9e03d8f | blueswir1 | int size))
|
56 | 1a2fb1c0 | blueswir1 | #endif
|
57 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_ldfsr, (void)) |
58 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_stfsr, (void)) |
59 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_check_ieee_exceptions, (void)) |
60 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_clear_float_exceptions, (void)) |
61 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fabss, (void)) |
62 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fsqrts, (void)) |
63 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fsqrtd, (void)) |
64 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fcmps, (void)) |
65 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fcmpd, (void)) |
66 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fcmpes, (void)) |
67 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fcmped, (void)) |
68 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fsqrtq, (void)) |
69 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fcmpq, (void)) |
70 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fcmpeq, (void)) |
71 | 7e8c2b6c | blueswir1 | #ifdef TARGET_SPARC64
|
72 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fabsd, (void)) |
73 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fcmps_fcc1, (void)) |
74 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fcmpd_fcc1, (void)) |
75 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fcmps_fcc2, (void)) |
76 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fcmpd_fcc2, (void)) |
77 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fcmps_fcc3, (void)) |
78 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fcmpd_fcc3, (void)) |
79 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fcmpes_fcc1, (void)) |
80 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fcmped_fcc1, (void)) |
81 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fcmpes_fcc2, (void)) |
82 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fcmped_fcc2, (void)) |
83 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fcmpes_fcc3, (void)) |
84 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fcmped_fcc3, (void)) |
85 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fabsq, (void)) |
86 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fcmpq_fcc1, (void)) |
87 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fcmpq_fcc2, (void)) |
88 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fcmpq_fcc3, (void)) |
89 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fcmpeq_fcc1, (void)) |
90 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fcmpeq_fcc2, (void)) |
91 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fcmpeq_fcc3, (void)) |
92 | 7e8c2b6c | blueswir1 | #endif
|
93 | c9e03d8f | blueswir1 | DEF_HELPER(void, raise_exception, (int tt)) |
94 | c9e03d8f | blueswir1 | #define F_HELPER_0_0(name) DEF_HELPER(void, helper_f ## name, (void)) |
95 | 44e7757c | blueswir1 | #define F_HELPER_SDQ_0_0(name) \
|
96 | 44e7757c | blueswir1 | F_HELPER_0_0(name ## s); \ |
97 | 44e7757c | blueswir1 | F_HELPER_0_0(name ## d); \ |
98 | 44e7757c | blueswir1 | F_HELPER_0_0(name ## q) |
99 | 44e7757c | blueswir1 | |
100 | 44e7757c | blueswir1 | F_HELPER_SDQ_0_0(add); |
101 | 44e7757c | blueswir1 | F_HELPER_SDQ_0_0(sub); |
102 | 44e7757c | blueswir1 | F_HELPER_SDQ_0_0(mul); |
103 | 44e7757c | blueswir1 | F_HELPER_SDQ_0_0(div); |
104 | 44e7757c | blueswir1 | |
105 | 44e7757c | blueswir1 | F_HELPER_0_0(smuld); |
106 | 44e7757c | blueswir1 | F_HELPER_0_0(dmulq); |
107 | 44e7757c | blueswir1 | |
108 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fnegs, (void)) |
109 | 44e7757c | blueswir1 | F_HELPER_SDQ_0_0(ito); |
110 | 44e7757c | blueswir1 | #ifdef TARGET_SPARC64
|
111 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fnegd, (void)) |
112 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_fnegq, (void)) |
113 | 44e7757c | blueswir1 | F_HELPER_SDQ_0_0(xto); |
114 | 44e7757c | blueswir1 | #endif
|
115 | 44e7757c | blueswir1 | F_HELPER_0_0(dtos); |
116 | 44e7757c | blueswir1 | F_HELPER_0_0(stod); |
117 | 44e7757c | blueswir1 | F_HELPER_0_0(qtos); |
118 | 44e7757c | blueswir1 | F_HELPER_0_0(stoq); |
119 | 44e7757c | blueswir1 | F_HELPER_0_0(qtod); |
120 | 44e7757c | blueswir1 | F_HELPER_0_0(dtoq); |
121 | 44e7757c | blueswir1 | F_HELPER_0_0(stoi); |
122 | 44e7757c | blueswir1 | F_HELPER_0_0(dtoi); |
123 | 44e7757c | blueswir1 | F_HELPER_0_0(qtoi); |
124 | 44e7757c | blueswir1 | #ifdef TARGET_SPARC64
|
125 | 44e7757c | blueswir1 | F_HELPER_0_0(stox); |
126 | 44e7757c | blueswir1 | F_HELPER_0_0(dtox); |
127 | 44e7757c | blueswir1 | F_HELPER_0_0(qtox); |
128 | 44e7757c | blueswir1 | F_HELPER_0_0(aligndata); |
129 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_movl_FT0_0, (void)) |
130 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_movl_DT0_0, (void)) |
131 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_movl_FT0_1, (void)) |
132 | c9e03d8f | blueswir1 | DEF_HELPER(void, helper_movl_DT0_1, (void)) |
133 | c9e03d8f | blueswir1 | |
134 | 44e7757c | blueswir1 | F_HELPER_0_0(not); |
135 | 44e7757c | blueswir1 | F_HELPER_0_0(nots); |
136 | 44e7757c | blueswir1 | F_HELPER_0_0(nor); |
137 | 44e7757c | blueswir1 | F_HELPER_0_0(nors); |
138 | 44e7757c | blueswir1 | F_HELPER_0_0(or); |
139 | 44e7757c | blueswir1 | F_HELPER_0_0(ors); |
140 | 44e7757c | blueswir1 | F_HELPER_0_0(xor); |
141 | 44e7757c | blueswir1 | F_HELPER_0_0(xors); |
142 | 44e7757c | blueswir1 | F_HELPER_0_0(and); |
143 | 44e7757c | blueswir1 | F_HELPER_0_0(ands); |
144 | 44e7757c | blueswir1 | F_HELPER_0_0(ornot); |
145 | 44e7757c | blueswir1 | F_HELPER_0_0(ornots); |
146 | 44e7757c | blueswir1 | F_HELPER_0_0(andnot); |
147 | 44e7757c | blueswir1 | F_HELPER_0_0(andnots); |
148 | 44e7757c | blueswir1 | F_HELPER_0_0(nand); |
149 | 44e7757c | blueswir1 | F_HELPER_0_0(nands); |
150 | 44e7757c | blueswir1 | F_HELPER_0_0(xnor); |
151 | 44e7757c | blueswir1 | F_HELPER_0_0(xnors); |
152 | 44e7757c | blueswir1 | F_HELPER_0_0(pmerge); |
153 | 44e7757c | blueswir1 | F_HELPER_0_0(mul8x16); |
154 | 44e7757c | blueswir1 | F_HELPER_0_0(mul8x16al); |
155 | 44e7757c | blueswir1 | F_HELPER_0_0(mul8x16au); |
156 | 44e7757c | blueswir1 | F_HELPER_0_0(mul8sux16); |
157 | 44e7757c | blueswir1 | F_HELPER_0_0(mul8ulx16); |
158 | 44e7757c | blueswir1 | F_HELPER_0_0(muld8sux16); |
159 | 44e7757c | blueswir1 | F_HELPER_0_0(muld8ulx16); |
160 | 44e7757c | blueswir1 | F_HELPER_0_0(expand); |
161 | 44e7757c | blueswir1 | #define VIS_HELPER(name) \
|
162 | 44e7757c | blueswir1 | F_HELPER_0_0(name##16); \ |
163 | 44e7757c | blueswir1 | F_HELPER_0_0(name##16s); \ |
164 | 44e7757c | blueswir1 | F_HELPER_0_0(name##32); \ |
165 | 44e7757c | blueswir1 | F_HELPER_0_0(name##32s) |
166 | 44e7757c | blueswir1 | |
167 | 44e7757c | blueswir1 | VIS_HELPER(padd); |
168 | 44e7757c | blueswir1 | VIS_HELPER(psub); |
169 | 44e7757c | blueswir1 | #define VIS_CMPHELPER(name) \
|
170 | 44e7757c | blueswir1 | F_HELPER_0_0(name##16); \ |
171 | 44e7757c | blueswir1 | F_HELPER_0_0(name##32) |
172 | 44e7757c | blueswir1 | VIS_CMPHELPER(cmpgt); |
173 | 44e7757c | blueswir1 | VIS_CMPHELPER(cmpeq); |
174 | 44e7757c | blueswir1 | VIS_CMPHELPER(cmple); |
175 | 44e7757c | blueswir1 | VIS_CMPHELPER(cmpne); |
176 | 44e7757c | blueswir1 | #endif
|
177 | 44e7757c | blueswir1 | #undef F_HELPER_0_0
|
178 | 44e7757c | blueswir1 | #undef F_HELPER_SDQ_0_0
|
179 | 44e7757c | blueswir1 | #undef VIS_HELPER
|
180 | 44e7757c | blueswir1 | #undef VIS_CMPHELPER
|
181 | 22548760 | blueswir1 | |
182 | 22548760 | blueswir1 | void cpu_lock(void); |
183 | 22548760 | blueswir1 | void cpu_unlock(void); |
184 | 22548760 | blueswir1 | void cpu_loop_exit(void); |
185 | 22548760 | blueswir1 | void set_cwp(int new_cwp); |
186 | f2bc7e7f | blueswir1 | void change_pstate(uint64_t new_pstate);
|
187 | 22548760 | blueswir1 | void memcpy32(target_ulong *dst, const target_ulong *src); |
188 | 22548760 | blueswir1 | target_ulong mmu_probe(CPUState *env, target_ulong address, int mmulev);
|
189 | 22548760 | blueswir1 | void dump_mmu(CPUState *env); |