blob: 01175e157a4899d93cf244077a411fcbcb4571fb [file] [log] [blame]
pbrooka7812ae2008-11-17 14:43:54 +00001#include "def-helper.h"
pbrook1497c962008-03-31 03:45:50 +00002
pbrooka7812ae2008-11-17 14:43:54 +00003DEF_HELPER_1(clz, i32, i32)
4DEF_HELPER_1(sxtb16, i32, i32)
5DEF_HELPER_1(uxtb16, i32, i32)
pbrookb26eefb2008-03-31 03:44:26 +00006
pbrooka7812ae2008-11-17 14:43:54 +00007DEF_HELPER_2(add_setq, i32, i32, i32)
8DEF_HELPER_2(add_saturate, i32, i32, i32)
9DEF_HELPER_2(sub_saturate, i32, i32, i32)
10DEF_HELPER_2(add_usaturate, i32, i32, i32)
11DEF_HELPER_2(sub_usaturate, i32, i32, i32)
12DEF_HELPER_1(double_saturate, i32, s32)
13DEF_HELPER_2(sdiv, s32, s32, s32)
14DEF_HELPER_2(udiv, i32, i32, i32)
15DEF_HELPER_1(rbit, i32, i32)
16DEF_HELPER_1(abs, i32, i32)
pbrook1497c962008-03-31 03:45:50 +000017
pbrook6ddbc6e2008-03-31 03:46:33 +000018#define PAS_OP(pfx) \
pbrooka7812ae2008-11-17 14:43:54 +000019 DEF_HELPER_3(pfx ## add8, i32, i32, i32, ptr) \
20 DEF_HELPER_3(pfx ## sub8, i32, i32, i32, ptr) \
21 DEF_HELPER_3(pfx ## sub16, i32, i32, i32, ptr) \
22 DEF_HELPER_3(pfx ## add16, i32, i32, i32, ptr) \
23 DEF_HELPER_3(pfx ## addsubx, i32, i32, i32, ptr) \
24 DEF_HELPER_3(pfx ## subaddx, i32, i32, i32, ptr)
pbrook6ddbc6e2008-03-31 03:46:33 +000025
26PAS_OP(s)
27PAS_OP(u)
28#undef PAS_OP
29
30#define PAS_OP(pfx) \
pbrooka7812ae2008-11-17 14:43:54 +000031 DEF_HELPER_2(pfx ## add8, i32, i32, i32) \
32 DEF_HELPER_2(pfx ## sub8, i32, i32, i32) \
33 DEF_HELPER_2(pfx ## sub16, i32, i32, i32) \
34 DEF_HELPER_2(pfx ## add16, i32, i32, i32) \
35 DEF_HELPER_2(pfx ## addsubx, i32, i32, i32) \
36 DEF_HELPER_2(pfx ## subaddx, i32, i32, i32)
pbrook6ddbc6e2008-03-31 03:46:33 +000037PAS_OP(q)
38PAS_OP(sh)
39PAS_OP(uq)
40PAS_OP(uh)
41#undef PAS_OP
42
pbrooka7812ae2008-11-17 14:43:54 +000043DEF_HELPER_2(ssat, i32, i32, i32)
44DEF_HELPER_2(usat, i32, i32, i32)
45DEF_HELPER_2(ssat16, i32, i32, i32)
46DEF_HELPER_2(usat16, i32, i32, i32)
pbrook6ddbc6e2008-03-31 03:46:33 +000047
pbrooka7812ae2008-11-17 14:43:54 +000048DEF_HELPER_2(usad8, i32, i32, i32)
pbrook6ddbc6e2008-03-31 03:46:33 +000049
pbrooka7812ae2008-11-17 14:43:54 +000050DEF_HELPER_1(logicq_cc, i32, i64)
pbrook5e3f8782008-03-31 03:47:34 +000051
pbrooka7812ae2008-11-17 14:43:54 +000052DEF_HELPER_3(sel_flags, i32, i32, i32, i32)
53DEF_HELPER_1(exception, void, i32)
54DEF_HELPER_0(wfi, void)
pbrookd9ba4832008-03-31 03:46:50 +000055
pbrooka7812ae2008-11-17 14:43:54 +000056DEF_HELPER_2(cpsr_write, void, i32, i32)
57DEF_HELPER_0(cpsr_read, i32)
pbrook6ddbc6e2008-03-31 03:46:33 +000058
pbrooka7812ae2008-11-17 14:43:54 +000059DEF_HELPER_3(v7m_msr, void, env, i32, i32)
60DEF_HELPER_2(v7m_mrs, i32, env, i32)
pbrook8984bd22008-03-31 03:47:48 +000061
pbrooka7812ae2008-11-17 14:43:54 +000062DEF_HELPER_3(set_cp15, void, env, i32, i32)
63DEF_HELPER_2(get_cp15, i32, env, i32)
pbrook8984bd22008-03-31 03:47:48 +000064
pbrooka7812ae2008-11-17 14:43:54 +000065DEF_HELPER_3(set_cp, void, env, i32, i32)
66DEF_HELPER_2(get_cp, i32, env, i32)
pbrook8984bd22008-03-31 03:47:48 +000067
pbrooka7812ae2008-11-17 14:43:54 +000068DEF_HELPER_2(get_r13_banked, i32, env, i32)
69DEF_HELPER_3(set_r13_banked, void, env, i32, i32)
pbrookb0109802008-03-31 03:47:03 +000070
pbrooka7812ae2008-11-17 14:43:54 +000071DEF_HELPER_2(mark_exclusive, void, env, i32)
72DEF_HELPER_2(test_exclusive, i32, env, i32)
73DEF_HELPER_1(clrex, void, env)
pbrook8f8e3aa2008-03-31 03:48:01 +000074
pbrooka7812ae2008-11-17 14:43:54 +000075DEF_HELPER_1(get_user_reg, i32, i32)
76DEF_HELPER_2(set_user_reg, void, i32, i32)
pbrookb0109802008-03-31 03:47:03 +000077
pbrooka7812ae2008-11-17 14:43:54 +000078DEF_HELPER_1(vfp_get_fpscr, i32, env)
79DEF_HELPER_2(vfp_set_fpscr, void, env, i32)
pbrook4373f3c2008-03-31 03:47:19 +000080
pbrooka7812ae2008-11-17 14:43:54 +000081DEF_HELPER_3(vfp_adds, f32, f32, f32, env)
82DEF_HELPER_3(vfp_addd, f64, f64, f64, env)
83DEF_HELPER_3(vfp_subs, f32, f32, f32, env)
84DEF_HELPER_3(vfp_subd, f64, f64, f64, env)
85DEF_HELPER_3(vfp_muls, f32, f32, f32, env)
86DEF_HELPER_3(vfp_muld, f64, f64, f64, env)
87DEF_HELPER_3(vfp_divs, f32, f32, f32, env)
88DEF_HELPER_3(vfp_divd, f64, f64, f64, env)
89DEF_HELPER_1(vfp_negs, f32, f32)
90DEF_HELPER_1(vfp_negd, f64, f64)
91DEF_HELPER_1(vfp_abss, f32, f32)
92DEF_HELPER_1(vfp_absd, f64, f64)
93DEF_HELPER_2(vfp_sqrts, f32, f32, env)
94DEF_HELPER_2(vfp_sqrtd, f64, f64, env)
95DEF_HELPER_3(vfp_cmps, void, f32, f32, env)
96DEF_HELPER_3(vfp_cmpd, void, f64, f64, env)
97DEF_HELPER_3(vfp_cmpes, void, f32, f32, env)
98DEF_HELPER_3(vfp_cmped, void, f64, f64, env)
pbrook4373f3c2008-03-31 03:47:19 +000099
pbrooka7812ae2008-11-17 14:43:54 +0000100DEF_HELPER_2(vfp_fcvtds, f64, f32, env)
101DEF_HELPER_2(vfp_fcvtsd, f32, f64, env)
pbrook4373f3c2008-03-31 03:47:19 +0000102
pbrooka7812ae2008-11-17 14:43:54 +0000103DEF_HELPER_2(vfp_uitos, f32, f32, env)
104DEF_HELPER_2(vfp_uitod, f64, f32, env)
105DEF_HELPER_2(vfp_sitos, f32, f32, env)
106DEF_HELPER_2(vfp_sitod, f64, f32, env)
pbrook4373f3c2008-03-31 03:47:19 +0000107
pbrooka7812ae2008-11-17 14:43:54 +0000108DEF_HELPER_2(vfp_touis, f32, f32, env)
109DEF_HELPER_2(vfp_touid, f32, f64, env)
110DEF_HELPER_2(vfp_touizs, f32, f32, env)
111DEF_HELPER_2(vfp_touizd, f32, f64, env)
112DEF_HELPER_2(vfp_tosis, f32, f32, env)
113DEF_HELPER_2(vfp_tosid, f32, f64, env)
114DEF_HELPER_2(vfp_tosizs, f32, f32, env)
115DEF_HELPER_2(vfp_tosizd, f32, f64, env)
pbrook4373f3c2008-03-31 03:47:19 +0000116
pbrooka7812ae2008-11-17 14:43:54 +0000117DEF_HELPER_3(vfp_toshs, f32, f32, i32, env)
118DEF_HELPER_3(vfp_tosls, f32, f32, i32, env)
119DEF_HELPER_3(vfp_touhs, f32, f32, i32, env)
120DEF_HELPER_3(vfp_touls, f32, f32, i32, env)
121DEF_HELPER_3(vfp_toshd, f64, f64, i32, env)
122DEF_HELPER_3(vfp_tosld, f64, f64, i32, env)
123DEF_HELPER_3(vfp_touhd, f64, f64, i32, env)
124DEF_HELPER_3(vfp_tould, f64, f64, i32, env)
125DEF_HELPER_3(vfp_shtos, f32, f32, i32, env)
126DEF_HELPER_3(vfp_sltos, f32, f32, i32, env)
127DEF_HELPER_3(vfp_uhtos, f32, f32, i32, env)
128DEF_HELPER_3(vfp_ultos, f32, f32, i32, env)
129DEF_HELPER_3(vfp_shtod, f64, f64, i32, env)
130DEF_HELPER_3(vfp_sltod, f64, f64, i32, env)
131DEF_HELPER_3(vfp_uhtod, f64, f64, i32, env)
132DEF_HELPER_3(vfp_ultod, f64, f64, i32, env)
pbrook4373f3c2008-03-31 03:47:19 +0000133
pbrooka7812ae2008-11-17 14:43:54 +0000134DEF_HELPER_3(recps_f32, f32, f32, f32, env)
135DEF_HELPER_3(rsqrts_f32, f32, f32, f32, env)
136DEF_HELPER_2(recpe_f32, f32, f32, env)
137DEF_HELPER_2(rsqrte_f32, f32, f32, env)
138DEF_HELPER_2(recpe_u32, i32, i32, env)
139DEF_HELPER_2(rsqrte_u32, i32, i32, env)
140DEF_HELPER_4(neon_tbl, i32, i32, i32, i32, i32)
141DEF_HELPER_2(neon_add_saturate_u64, i64, i64, i64)
142DEF_HELPER_2(neon_add_saturate_s64, i64, i64, i64)
143DEF_HELPER_2(neon_sub_saturate_u64, i64, i64, i64)
144DEF_HELPER_2(neon_sub_saturate_s64, i64, i64, i64)
pbrook4373f3c2008-03-31 03:47:19 +0000145
pbrooka7812ae2008-11-17 14:43:54 +0000146DEF_HELPER_2(add_cc, i32, i32, i32)
147DEF_HELPER_2(adc_cc, i32, i32, i32)
148DEF_HELPER_2(sub_cc, i32, i32, i32)
149DEF_HELPER_2(sbc_cc, i32, i32, i32)
pbrook8984bd22008-03-31 03:47:48 +0000150
pbrooka7812ae2008-11-17 14:43:54 +0000151DEF_HELPER_2(shl, i32, i32, i32)
152DEF_HELPER_2(shr, i32, i32, i32)
153DEF_HELPER_2(sar, i32, i32, i32)
154DEF_HELPER_2(ror, i32, i32, i32)
155DEF_HELPER_2(shl_cc, i32, i32, i32)
156DEF_HELPER_2(shr_cc, i32, i32, i32)
157DEF_HELPER_2(sar_cc, i32, i32, i32)
158DEF_HELPER_2(ror_cc, i32, i32, i32)
pbrook8984bd22008-03-31 03:47:48 +0000159
pbrookad694712008-03-31 03:48:30 +0000160/* neon_helper.c */
pbrooka7812ae2008-11-17 14:43:54 +0000161DEF_HELPER_3(neon_qadd_u8, i32, env, i32, i32)
162DEF_HELPER_3(neon_qadd_s8, i32, env, i32, i32)
163DEF_HELPER_3(neon_qadd_u16, i32, env, i32, i32)
164DEF_HELPER_3(neon_qadd_s16, i32, env, i32, i32)
165DEF_HELPER_3(neon_qsub_u8, i32, env, i32, i32)
166DEF_HELPER_3(neon_qsub_s8, i32, env, i32, i32)
167DEF_HELPER_3(neon_qsub_u16, i32, env, i32, i32)
168DEF_HELPER_3(neon_qsub_s16, i32, env, i32, i32)
pbrookad694712008-03-31 03:48:30 +0000169
pbrooka7812ae2008-11-17 14:43:54 +0000170DEF_HELPER_2(neon_hadd_s8, i32, i32, i32)
171DEF_HELPER_2(neon_hadd_u8, i32, i32, i32)
172DEF_HELPER_2(neon_hadd_s16, i32, i32, i32)
173DEF_HELPER_2(neon_hadd_u16, i32, i32, i32)
174DEF_HELPER_2(neon_hadd_s32, s32, s32, s32)
175DEF_HELPER_2(neon_hadd_u32, i32, i32, i32)
176DEF_HELPER_2(neon_rhadd_s8, i32, i32, i32)
177DEF_HELPER_2(neon_rhadd_u8, i32, i32, i32)
178DEF_HELPER_2(neon_rhadd_s16, i32, i32, i32)
179DEF_HELPER_2(neon_rhadd_u16, i32, i32, i32)
180DEF_HELPER_2(neon_rhadd_s32, s32, s32, s32)
181DEF_HELPER_2(neon_rhadd_u32, i32, i32, i32)
182DEF_HELPER_2(neon_hsub_s8, i32, i32, i32)
183DEF_HELPER_2(neon_hsub_u8, i32, i32, i32)
184DEF_HELPER_2(neon_hsub_s16, i32, i32, i32)
185DEF_HELPER_2(neon_hsub_u16, i32, i32, i32)
186DEF_HELPER_2(neon_hsub_s32, s32, s32, s32)
187DEF_HELPER_2(neon_hsub_u32, i32, i32, i32)
pbrookad694712008-03-31 03:48:30 +0000188
pbrooka7812ae2008-11-17 14:43:54 +0000189DEF_HELPER_2(neon_cgt_u8, i32, i32, i32)
190DEF_HELPER_2(neon_cgt_s8, i32, i32, i32)
191DEF_HELPER_2(neon_cgt_u16, i32, i32, i32)
192DEF_HELPER_2(neon_cgt_s16, i32, i32, i32)
193DEF_HELPER_2(neon_cgt_u32, i32, i32, i32)
194DEF_HELPER_2(neon_cgt_s32, i32, i32, i32)
195DEF_HELPER_2(neon_cge_u8, i32, i32, i32)
196DEF_HELPER_2(neon_cge_s8, i32, i32, i32)
197DEF_HELPER_2(neon_cge_u16, i32, i32, i32)
198DEF_HELPER_2(neon_cge_s16, i32, i32, i32)
199DEF_HELPER_2(neon_cge_u32, i32, i32, i32)
200DEF_HELPER_2(neon_cge_s32, i32, i32, i32)
pbrookad694712008-03-31 03:48:30 +0000201
pbrooka7812ae2008-11-17 14:43:54 +0000202DEF_HELPER_2(neon_min_u8, i32, i32, i32)
203DEF_HELPER_2(neon_min_s8, i32, i32, i32)
204DEF_HELPER_2(neon_min_u16, i32, i32, i32)
205DEF_HELPER_2(neon_min_s16, i32, i32, i32)
206DEF_HELPER_2(neon_min_u32, i32, i32, i32)
207DEF_HELPER_2(neon_min_s32, i32, i32, i32)
208DEF_HELPER_2(neon_max_u8, i32, i32, i32)
209DEF_HELPER_2(neon_max_s8, i32, i32, i32)
210DEF_HELPER_2(neon_max_u16, i32, i32, i32)
211DEF_HELPER_2(neon_max_s16, i32, i32, i32)
212DEF_HELPER_2(neon_max_u32, i32, i32, i32)
213DEF_HELPER_2(neon_max_s32, i32, i32, i32)
214DEF_HELPER_2(neon_pmin_u8, i32, i32, i32)
215DEF_HELPER_2(neon_pmin_s8, i32, i32, i32)
216DEF_HELPER_2(neon_pmin_u16, i32, i32, i32)
217DEF_HELPER_2(neon_pmin_s16, i32, i32, i32)
218DEF_HELPER_2(neon_pmax_u8, i32, i32, i32)
219DEF_HELPER_2(neon_pmax_s8, i32, i32, i32)
220DEF_HELPER_2(neon_pmax_u16, i32, i32, i32)
221DEF_HELPER_2(neon_pmax_s16, i32, i32, i32)
pbrookad694712008-03-31 03:48:30 +0000222
pbrooka7812ae2008-11-17 14:43:54 +0000223DEF_HELPER_2(neon_abd_u8, i32, i32, i32)
224DEF_HELPER_2(neon_abd_s8, i32, i32, i32)
225DEF_HELPER_2(neon_abd_u16, i32, i32, i32)
226DEF_HELPER_2(neon_abd_s16, i32, i32, i32)
227DEF_HELPER_2(neon_abd_u32, i32, i32, i32)
228DEF_HELPER_2(neon_abd_s32, i32, i32, i32)
pbrookad694712008-03-31 03:48:30 +0000229
pbrooka7812ae2008-11-17 14:43:54 +0000230DEF_HELPER_2(neon_shl_u8, i32, i32, i32)
231DEF_HELPER_2(neon_shl_s8, i32, i32, i32)
232DEF_HELPER_2(neon_shl_u16, i32, i32, i32)
233DEF_HELPER_2(neon_shl_s16, i32, i32, i32)
234DEF_HELPER_2(neon_shl_u32, i32, i32, i32)
235DEF_HELPER_2(neon_shl_s32, i32, i32, i32)
236DEF_HELPER_2(neon_shl_u64, i64, i64, i64)
237DEF_HELPER_2(neon_shl_s64, i64, i64, i64)
238DEF_HELPER_2(neon_rshl_u8, i32, i32, i32)
239DEF_HELPER_2(neon_rshl_s8, i32, i32, i32)
240DEF_HELPER_2(neon_rshl_u16, i32, i32, i32)
241DEF_HELPER_2(neon_rshl_s16, i32, i32, i32)
242DEF_HELPER_2(neon_rshl_u32, i32, i32, i32)
243DEF_HELPER_2(neon_rshl_s32, i32, i32, i32)
244DEF_HELPER_2(neon_rshl_u64, i64, i64, i64)
245DEF_HELPER_2(neon_rshl_s64, i64, i64, i64)
246DEF_HELPER_3(neon_qshl_u8, i32, env, i32, i32)
247DEF_HELPER_3(neon_qshl_s8, i32, env, i32, i32)
248DEF_HELPER_3(neon_qshl_u16, i32, env, i32, i32)
249DEF_HELPER_3(neon_qshl_s16, i32, env, i32, i32)
250DEF_HELPER_3(neon_qshl_u32, i32, env, i32, i32)
251DEF_HELPER_3(neon_qshl_s32, i32, env, i32, i32)
252DEF_HELPER_3(neon_qshl_u64, i64, env, i64, i64)
253DEF_HELPER_3(neon_qshl_s64, i64, env, i64, i64)
254DEF_HELPER_3(neon_qrshl_u8, i32, env, i32, i32)
255DEF_HELPER_3(neon_qrshl_s8, i32, env, i32, i32)
256DEF_HELPER_3(neon_qrshl_u16, i32, env, i32, i32)
257DEF_HELPER_3(neon_qrshl_s16, i32, env, i32, i32)
258DEF_HELPER_3(neon_qrshl_u32, i32, env, i32, i32)
259DEF_HELPER_3(neon_qrshl_s32, i32, env, i32, i32)
260DEF_HELPER_3(neon_qrshl_u64, i64, env, i64, i64)
261DEF_HELPER_3(neon_qrshl_s64, i64, env, i64, i64)
pbrookad694712008-03-31 03:48:30 +0000262
pbrooka7812ae2008-11-17 14:43:54 +0000263DEF_HELPER_2(neon_add_u8, i32, i32, i32)
264DEF_HELPER_2(neon_add_u16, i32, i32, i32)
265DEF_HELPER_2(neon_padd_u8, i32, i32, i32)
266DEF_HELPER_2(neon_padd_u16, i32, i32, i32)
267DEF_HELPER_2(neon_sub_u8, i32, i32, i32)
268DEF_HELPER_2(neon_sub_u16, i32, i32, i32)
269DEF_HELPER_2(neon_mul_u8, i32, i32, i32)
270DEF_HELPER_2(neon_mul_u16, i32, i32, i32)
271DEF_HELPER_2(neon_mul_p8, i32, i32, i32)
pbrookad694712008-03-31 03:48:30 +0000272
pbrooka7812ae2008-11-17 14:43:54 +0000273DEF_HELPER_2(neon_tst_u8, i32, i32, i32)
274DEF_HELPER_2(neon_tst_u16, i32, i32, i32)
275DEF_HELPER_2(neon_tst_u32, i32, i32, i32)
276DEF_HELPER_2(neon_ceq_u8, i32, i32, i32)
277DEF_HELPER_2(neon_ceq_u16, i32, i32, i32)
278DEF_HELPER_2(neon_ceq_u32, i32, i32, i32)
pbrookad694712008-03-31 03:48:30 +0000279
pbrooka7812ae2008-11-17 14:43:54 +0000280DEF_HELPER_1(neon_abs_s8, i32, i32)
281DEF_HELPER_1(neon_abs_s16, i32, i32)
282DEF_HELPER_1(neon_clz_u8, i32, i32)
283DEF_HELPER_1(neon_clz_u16, i32, i32)
284DEF_HELPER_1(neon_cls_s8, i32, i32)
285DEF_HELPER_1(neon_cls_s16, i32, i32)
286DEF_HELPER_1(neon_cls_s32, i32, i32)
287DEF_HELPER_1(neon_cnt_u8, i32, i32)
pbrookad694712008-03-31 03:48:30 +0000288
pbrooka7812ae2008-11-17 14:43:54 +0000289DEF_HELPER_3(neon_qdmulh_s16, i32, env, i32, i32)
290DEF_HELPER_3(neon_qrdmulh_s16, i32, env, i32, i32)
291DEF_HELPER_3(neon_qdmulh_s32, i32, env, i32, i32)
292DEF_HELPER_3(neon_qrdmulh_s32, i32, env, i32, i32)
pbrookad694712008-03-31 03:48:30 +0000293
pbrooka7812ae2008-11-17 14:43:54 +0000294DEF_HELPER_1(neon_narrow_u8, i32, i64)
295DEF_HELPER_1(neon_narrow_u16, i32, i64)
296DEF_HELPER_2(neon_narrow_sat_u8, i32, env, i64)
297DEF_HELPER_2(neon_narrow_sat_s8, i32, env, i64)
298DEF_HELPER_2(neon_narrow_sat_u16, i32, env, i64)
299DEF_HELPER_2(neon_narrow_sat_s16, i32, env, i64)
300DEF_HELPER_2(neon_narrow_sat_u32, i32, env, i64)
301DEF_HELPER_2(neon_narrow_sat_s32, i32, env, i64)
302DEF_HELPER_1(neon_narrow_high_u8, i32, i64)
303DEF_HELPER_1(neon_narrow_high_u16, i32, i64)
304DEF_HELPER_1(neon_narrow_round_high_u8, i32, i64)
305DEF_HELPER_1(neon_narrow_round_high_u16, i32, i64)
306DEF_HELPER_1(neon_widen_u8, i64, i32)
307DEF_HELPER_1(neon_widen_s8, i64, i32)
308DEF_HELPER_1(neon_widen_u16, i64, i32)
309DEF_HELPER_1(neon_widen_s16, i64, i32)
pbrookad694712008-03-31 03:48:30 +0000310
pbrooka7812ae2008-11-17 14:43:54 +0000311DEF_HELPER_2(neon_addl_u16, i64, i64, i64)
312DEF_HELPER_2(neon_addl_u32, i64, i64, i64)
313DEF_HELPER_2(neon_paddl_u16, i64, i64, i64)
314DEF_HELPER_2(neon_paddl_u32, i64, i64, i64)
315DEF_HELPER_2(neon_subl_u16, i64, i64, i64)
316DEF_HELPER_2(neon_subl_u32, i64, i64, i64)
317DEF_HELPER_3(neon_addl_saturate_s32, i64, env, i64, i64)
318DEF_HELPER_3(neon_addl_saturate_s64, i64, env, i64, i64)
319DEF_HELPER_2(neon_abdl_u16, i64, i32, i32)
320DEF_HELPER_2(neon_abdl_s16, i64, i32, i32)
321DEF_HELPER_2(neon_abdl_u32, i64, i32, i32)
322DEF_HELPER_2(neon_abdl_s32, i64, i32, i32)
323DEF_HELPER_2(neon_abdl_u64, i64, i32, i32)
324DEF_HELPER_2(neon_abdl_s64, i64, i32, i32)
325DEF_HELPER_2(neon_mull_u8, i64, i32, i32)
326DEF_HELPER_2(neon_mull_s8, i64, i32, i32)
327DEF_HELPER_2(neon_mull_u16, i64, i32, i32)
328DEF_HELPER_2(neon_mull_s16, i64, i32, i32)
pbrookad694712008-03-31 03:48:30 +0000329
pbrooka7812ae2008-11-17 14:43:54 +0000330DEF_HELPER_1(neon_negl_u16, i64, i64)
331DEF_HELPER_1(neon_negl_u32, i64, i64)
332DEF_HELPER_1(neon_negl_u64, i64, i64)
pbrookad694712008-03-31 03:48:30 +0000333
pbrooka7812ae2008-11-17 14:43:54 +0000334DEF_HELPER_2(neon_qabs_s8, i32, env, i32)
335DEF_HELPER_2(neon_qabs_s16, i32, env, i32)
336DEF_HELPER_2(neon_qabs_s32, i32, env, i32)
337DEF_HELPER_2(neon_qneg_s8, i32, env, i32)
338DEF_HELPER_2(neon_qneg_s16, i32, env, i32)
339DEF_HELPER_2(neon_qneg_s32, i32, env, i32)
pbrookad694712008-03-31 03:48:30 +0000340
pbrooka7812ae2008-11-17 14:43:54 +0000341DEF_HELPER_0(neon_trn_u8, void)
342DEF_HELPER_0(neon_trn_u16, void)
343DEF_HELPER_0(neon_unzip_u8, void)
344DEF_HELPER_0(neon_zip_u8, void)
345DEF_HELPER_0(neon_zip_u16, void)
pbrookad694712008-03-31 03:48:30 +0000346
pbrooka7812ae2008-11-17 14:43:54 +0000347DEF_HELPER_2(neon_min_f32, i32, i32, i32)
348DEF_HELPER_2(neon_max_f32, i32, i32, i32)
349DEF_HELPER_2(neon_abd_f32, i32, i32, i32)
350DEF_HELPER_2(neon_add_f32, i32, i32, i32)
351DEF_HELPER_2(neon_sub_f32, i32, i32, i32)
352DEF_HELPER_2(neon_mul_f32, i32, i32, i32)
353DEF_HELPER_2(neon_ceq_f32, i32, i32, i32)
354DEF_HELPER_2(neon_cge_f32, i32, i32, i32)
355DEF_HELPER_2(neon_cgt_f32, i32, i32, i32)
356DEF_HELPER_2(neon_acge_f32, i32, i32, i32)
357DEF_HELPER_2(neon_acgt_f32, i32, i32, i32)
pbrookad694712008-03-31 03:48:30 +0000358
pbrooke6771372008-03-31 03:49:05 +0000359/* iwmmxt_helper.c */
pbrooka7812ae2008-11-17 14:43:54 +0000360DEF_HELPER_2(iwmmxt_maddsq, i64, i64, i64)
361DEF_HELPER_2(iwmmxt_madduq, i64, i64, i64)
362DEF_HELPER_2(iwmmxt_sadb, i64, i64, i64)
363DEF_HELPER_2(iwmmxt_sadw, i64, i64, i64)
364DEF_HELPER_2(iwmmxt_mulslw, i64, i64, i64)
365DEF_HELPER_2(iwmmxt_mulshw, i64, i64, i64)
366DEF_HELPER_2(iwmmxt_mululw, i64, i64, i64)
367DEF_HELPER_2(iwmmxt_muluhw, i64, i64, i64)
368DEF_HELPER_2(iwmmxt_macsw, i64, i64, i64)
369DEF_HELPER_2(iwmmxt_macuw, i64, i64, i64)
370DEF_HELPER_1(iwmmxt_setpsr_nz, i32, i64)
pbrooke6771372008-03-31 03:49:05 +0000371
372#define DEF_IWMMXT_HELPER_SIZE_ENV(name) \
pbrooka7812ae2008-11-17 14:43:54 +0000373DEF_HELPER_3(iwmmxt_##name##b, i64, env, i64, i64) \
374DEF_HELPER_3(iwmmxt_##name##w, i64, env, i64, i64) \
375DEF_HELPER_3(iwmmxt_##name##l, i64, env, i64, i64) \
pbrooke6771372008-03-31 03:49:05 +0000376
377DEF_IWMMXT_HELPER_SIZE_ENV(unpackl)
378DEF_IWMMXT_HELPER_SIZE_ENV(unpackh)
379
pbrooka7812ae2008-11-17 14:43:54 +0000380DEF_HELPER_2(iwmmxt_unpacklub, i64, env, i64)
381DEF_HELPER_2(iwmmxt_unpackluw, i64, env, i64)
382DEF_HELPER_2(iwmmxt_unpacklul, i64, env, i64)
383DEF_HELPER_2(iwmmxt_unpackhub, i64, env, i64)
384DEF_HELPER_2(iwmmxt_unpackhuw, i64, env, i64)
385DEF_HELPER_2(iwmmxt_unpackhul, i64, env, i64)
386DEF_HELPER_2(iwmmxt_unpacklsb, i64, env, i64)
387DEF_HELPER_2(iwmmxt_unpacklsw, i64, env, i64)
388DEF_HELPER_2(iwmmxt_unpacklsl, i64, env, i64)
389DEF_HELPER_2(iwmmxt_unpackhsb, i64, env, i64)
390DEF_HELPER_2(iwmmxt_unpackhsw, i64, env, i64)
391DEF_HELPER_2(iwmmxt_unpackhsl, i64, env, i64)
pbrooke6771372008-03-31 03:49:05 +0000392
393DEF_IWMMXT_HELPER_SIZE_ENV(cmpeq)
394DEF_IWMMXT_HELPER_SIZE_ENV(cmpgtu)
395DEF_IWMMXT_HELPER_SIZE_ENV(cmpgts)
396
397DEF_IWMMXT_HELPER_SIZE_ENV(mins)
398DEF_IWMMXT_HELPER_SIZE_ENV(minu)
399DEF_IWMMXT_HELPER_SIZE_ENV(maxs)
400DEF_IWMMXT_HELPER_SIZE_ENV(maxu)
401
402DEF_IWMMXT_HELPER_SIZE_ENV(subn)
403DEF_IWMMXT_HELPER_SIZE_ENV(addn)
404DEF_IWMMXT_HELPER_SIZE_ENV(subu)
405DEF_IWMMXT_HELPER_SIZE_ENV(addu)
406DEF_IWMMXT_HELPER_SIZE_ENV(subs)
407DEF_IWMMXT_HELPER_SIZE_ENV(adds)
408
pbrooka7812ae2008-11-17 14:43:54 +0000409DEF_HELPER_3(iwmmxt_avgb0, i64, env, i64, i64)
410DEF_HELPER_3(iwmmxt_avgb1, i64, env, i64, i64)
411DEF_HELPER_3(iwmmxt_avgw0, i64, env, i64, i64)
412DEF_HELPER_3(iwmmxt_avgw1, i64, env, i64, i64)
pbrooke6771372008-03-31 03:49:05 +0000413
pbrooka7812ae2008-11-17 14:43:54 +0000414DEF_HELPER_2(iwmmxt_msadb, i64, i64, i64)
pbrooke6771372008-03-31 03:49:05 +0000415
pbrooka7812ae2008-11-17 14:43:54 +0000416DEF_HELPER_3(iwmmxt_align, i64, i64, i64, i32)
417DEF_HELPER_4(iwmmxt_insr, i64, i64, i32, i32, i32)
pbrooke6771372008-03-31 03:49:05 +0000418
pbrooka7812ae2008-11-17 14:43:54 +0000419DEF_HELPER_1(iwmmxt_bcstb, i64, i32)
420DEF_HELPER_1(iwmmxt_bcstw, i64, i32)
421DEF_HELPER_1(iwmmxt_bcstl, i64, i32)
pbrooke6771372008-03-31 03:49:05 +0000422
pbrooka7812ae2008-11-17 14:43:54 +0000423DEF_HELPER_1(iwmmxt_addcb, i64, i64)
424DEF_HELPER_1(iwmmxt_addcw, i64, i64)
425DEF_HELPER_1(iwmmxt_addcl, i64, i64)
pbrooke6771372008-03-31 03:49:05 +0000426
pbrooka7812ae2008-11-17 14:43:54 +0000427DEF_HELPER_1(iwmmxt_msbb, i32, i64)
428DEF_HELPER_1(iwmmxt_msbw, i32, i64)
429DEF_HELPER_1(iwmmxt_msbl, i32, i64)
pbrooke6771372008-03-31 03:49:05 +0000430
pbrooka7812ae2008-11-17 14:43:54 +0000431DEF_HELPER_3(iwmmxt_srlw, i64, env, i64, i32)
432DEF_HELPER_3(iwmmxt_srll, i64, env, i64, i32)
433DEF_HELPER_3(iwmmxt_srlq, i64, env, i64, i32)
434DEF_HELPER_3(iwmmxt_sllw, i64, env, i64, i32)
435DEF_HELPER_3(iwmmxt_slll, i64, env, i64, i32)
436DEF_HELPER_3(iwmmxt_sllq, i64, env, i64, i32)
437DEF_HELPER_3(iwmmxt_sraw, i64, env, i64, i32)
438DEF_HELPER_3(iwmmxt_sral, i64, env, i64, i32)
439DEF_HELPER_3(iwmmxt_sraq, i64, env, i64, i32)
440DEF_HELPER_3(iwmmxt_rorw, i64, env, i64, i32)
441DEF_HELPER_3(iwmmxt_rorl, i64, env, i64, i32)
442DEF_HELPER_3(iwmmxt_rorq, i64, env, i64, i32)
443DEF_HELPER_3(iwmmxt_shufh, i64, env, i64, i32)
pbrooke6771372008-03-31 03:49:05 +0000444
pbrooka7812ae2008-11-17 14:43:54 +0000445DEF_HELPER_3(iwmmxt_packuw, i64, env, i64, i64)
446DEF_HELPER_3(iwmmxt_packul, i64, env, i64, i64)
447DEF_HELPER_3(iwmmxt_packuq, i64, env, i64, i64)
448DEF_HELPER_3(iwmmxt_packsw, i64, env, i64, i64)
449DEF_HELPER_3(iwmmxt_packsl, i64, env, i64, i64)
450DEF_HELPER_3(iwmmxt_packsq, i64, env, i64, i64)
pbrooke6771372008-03-31 03:49:05 +0000451
pbrooka7812ae2008-11-17 14:43:54 +0000452DEF_HELPER_3(iwmmxt_muladdsl, i64, i64, i32, i32)
453DEF_HELPER_3(iwmmxt_muladdsw, i64, i64, i32, i32)
454DEF_HELPER_3(iwmmxt_muladdswl, i64, i64, i32, i32)
pbrooke6771372008-03-31 03:49:05 +0000455
pbrookfe1479c2008-12-19 13:18:36 +0000456DEF_HELPER_2(set_teecr, void, env, i32)
457
pbrooka7812ae2008-11-17 14:43:54 +0000458#include "def-helper.h"