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