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