1 #include "def-helper.h"
4 DEF_HELPER_1(rett
, void, env
)
5 DEF_HELPER_2(wrpsr
, void, env
, tl
)
6 DEF_HELPER_1(rdpsr
, tl
, env
)
8 DEF_HELPER_2(wrpil
, void, env
, tl
)
9 DEF_HELPER_2(wrpstate
, void, env
, tl
)
10 DEF_HELPER_1(done
, void, env
)
11 DEF_HELPER_1(retry
, void, env
)
12 DEF_HELPER_1(flushw
, void, env
)
13 DEF_HELPER_1(saved
, void, env
)
14 DEF_HELPER_1(restored
, void, env
)
15 DEF_HELPER_1(rdccr
, tl
, env
)
16 DEF_HELPER_2(wrccr
, void, env
, tl
)
17 DEF_HELPER_1(rdcwp
, tl
, env
)
18 DEF_HELPER_2(wrcwp
, void, env
, tl
)
19 DEF_HELPER_FLAGS_2(array8
, TCG_CALL_CONST
| TCG_CALL_PURE
, tl
, tl
, tl
)
20 DEF_HELPER_1(popc
, tl
, tl
)
21 DEF_HELPER_3(ldda_asi
, void, tl
, int, int)
22 DEF_HELPER_4(ldf_asi
, void, tl
, int, int, int)
23 DEF_HELPER_4(stf_asi
, void, tl
, int, int, int)
24 DEF_HELPER_4(cas_asi
, tl
, tl
, tl
, tl
, i32
)
25 DEF_HELPER_4(casx_asi
, tl
, tl
, tl
, tl
, i32
)
26 DEF_HELPER_2(set_softint
, void, env
, i64
)
27 DEF_HELPER_2(clear_softint
, void, env
, i64
)
28 DEF_HELPER_2(write_softint
, void, env
, i64
)
29 DEF_HELPER_2(tick_set_count
, void, ptr
, i64
)
30 DEF_HELPER_1(tick_get_count
, i64
, ptr
)
31 DEF_HELPER_2(tick_set_limit
, void, ptr
, i64
)
33 DEF_HELPER_2(check_align
, void, tl
, i32
)
34 DEF_HELPER_1(debug
, void, env
)
35 DEF_HELPER_1(save
, void, env
)
36 DEF_HELPER_1(restore
, void, env
)
37 DEF_HELPER_3(udiv
, tl
, env
, tl
, tl
)
38 DEF_HELPER_3(udiv_cc
, tl
, env
, tl
, tl
)
39 DEF_HELPER_3(sdiv
, tl
, env
, tl
, tl
)
40 DEF_HELPER_3(sdiv_cc
, tl
, env
, tl
, tl
)
41 DEF_HELPER_2(ldqf
, void, tl
, int)
42 DEF_HELPER_2(stqf
, void, tl
, int)
43 #if !defined(CONFIG_USER_ONLY) || defined(TARGET_SPARC64)
44 DEF_HELPER_4(ld_asi
, i64
, tl
, int, int, int)
45 DEF_HELPER_4(st_asi
, void, tl
, i64
, int, int)
47 DEF_HELPER_2(ldfsr
, void, env
, i32
)
48 DEF_HELPER_FLAGS_1(fabss
, TCG_CALL_CONST
| TCG_CALL_PURE
, f32
, f32
)
49 DEF_HELPER_2(fsqrts
, f32
, env
, f32
)
50 DEF_HELPER_2(fsqrtd
, f64
, env
, f64
)
51 DEF_HELPER_3(fcmps
, void, env
, f32
, f32
)
52 DEF_HELPER_3(fcmpd
, void, env
, f64
, f64
)
53 DEF_HELPER_3(fcmpes
, void, env
, f32
, f32
)
54 DEF_HELPER_3(fcmped
, void, env
, f64
, f64
)
55 DEF_HELPER_1(fsqrtq
, void, env
)
56 DEF_HELPER_1(fcmpq
, void, env
)
57 DEF_HELPER_1(fcmpeq
, void, env
)
59 DEF_HELPER_2(ldxfsr
, void, env
, i64
)
60 DEF_HELPER_FLAGS_1(fabsd
, TCG_CALL_CONST
| TCG_CALL_PURE
, f64
, f64
)
61 DEF_HELPER_3(fcmps_fcc1
, void, env
, f32
, f32
)
62 DEF_HELPER_3(fcmps_fcc2
, void, env
, f32
, f32
)
63 DEF_HELPER_3(fcmps_fcc3
, void, env
, f32
, f32
)
64 DEF_HELPER_3(fcmpd_fcc1
, void, env
, f64
, f64
)
65 DEF_HELPER_3(fcmpd_fcc2
, void, env
, f64
, f64
)
66 DEF_HELPER_3(fcmpd_fcc3
, void, env
, f64
, f64
)
67 DEF_HELPER_3(fcmpes_fcc1
, void, env
, f32
, f32
)
68 DEF_HELPER_3(fcmpes_fcc2
, void, env
, f32
, f32
)
69 DEF_HELPER_3(fcmpes_fcc3
, void, env
, f32
, f32
)
70 DEF_HELPER_3(fcmped_fcc1
, void, env
, f64
, f64
)
71 DEF_HELPER_3(fcmped_fcc2
, void, env
, f64
, f64
)
72 DEF_HELPER_3(fcmped_fcc3
, void, env
, f64
, f64
)
73 DEF_HELPER_1(fabsq
, void, env
)
74 DEF_HELPER_1(fcmpq_fcc1
, void, env
)
75 DEF_HELPER_1(fcmpq_fcc2
, void, env
)
76 DEF_HELPER_1(fcmpq_fcc3
, void, env
)
77 DEF_HELPER_1(fcmpeq_fcc1
, void, env
)
78 DEF_HELPER_1(fcmpeq_fcc2
, void, env
)
79 DEF_HELPER_1(fcmpeq_fcc3
, void, env
)
81 DEF_HELPER_2(raise_exception
, void, env
, int)
82 DEF_HELPER_0(shutdown
, void)
83 #define F_HELPER_0_1(name) DEF_HELPER_1(f ## name, void, env)
85 DEF_HELPER_3(faddd
, f64
, env
, f64
, f64
)
86 DEF_HELPER_3(fsubd
, f64
, env
, f64
, f64
)
87 DEF_HELPER_3(fmuld
, f64
, env
, f64
, f64
)
88 DEF_HELPER_3(fdivd
, f64
, env
, f64
, f64
)
94 DEF_HELPER_3(fadds
, f32
, env
, f32
, f32
)
95 DEF_HELPER_3(fsubs
, f32
, env
, f32
, f32
)
96 DEF_HELPER_3(fmuls
, f32
, env
, f32
, f32
)
97 DEF_HELPER_3(fdivs
, f32
, env
, f32
, f32
)
99 DEF_HELPER_3(fsmuld
, f64
, env
, f32
, f32
)
100 DEF_HELPER_3(fdmulq
, void, env
, f64
, f64
);
102 DEF_HELPER_FLAGS_1(fnegs
, TCG_CALL_CONST
| TCG_CALL_PURE
, f32
, f32
)
103 DEF_HELPER_2(fitod
, f64
, env
, s32
)
104 DEF_HELPER_2(fitoq
, void, env
, s32
)
106 DEF_HELPER_2(fitos
, f32
, env
, s32
)
108 #ifdef TARGET_SPARC64
109 DEF_HELPER_FLAGS_1(fnegd
, TCG_CALL_CONST
| TCG_CALL_PURE
, f64
, f64
)
110 DEF_HELPER_1(fnegq
, void, env
)
111 DEF_HELPER_2(fxtos
, f32
, env
, s64
)
112 DEF_HELPER_2(fxtod
, f64
, env
, s64
)
113 DEF_HELPER_2(fxtoq
, void, env
, s64
)
115 DEF_HELPER_2(fdtos
, f32
, env
, f64
)
116 DEF_HELPER_2(fstod
, f64
, env
, f32
)
117 DEF_HELPER_1(fqtos
, f32
, env
)
118 DEF_HELPER_2(fstoq
, void, env
, f32
)
119 DEF_HELPER_1(fqtod
, f64
, env
)
120 DEF_HELPER_2(fdtoq
, void, env
, f64
)
121 DEF_HELPER_2(fstoi
, s32
, env
, f32
)
122 DEF_HELPER_2(fdtoi
, s32
, env
, f64
)
123 DEF_HELPER_1(fqtoi
, s32
, env
)
124 #ifdef TARGET_SPARC64
125 DEF_HELPER_2(fstox
, s64
, env
, f32
)
126 DEF_HELPER_2(fdtox
, s64
, env
, f64
)
127 DEF_HELPER_1(fqtox
, s64
, env
)
129 DEF_HELPER_FLAGS_2(fpmerge
, TCG_CALL_CONST
| TCG_CALL_PURE
, i64
, i64
, i64
)
130 DEF_HELPER_FLAGS_2(fmul8x16
, TCG_CALL_CONST
| TCG_CALL_PURE
, i64
, i64
, i64
)
131 DEF_HELPER_FLAGS_2(fmul8x16al
, TCG_CALL_CONST
| TCG_CALL_PURE
, i64
, i64
, i64
)
132 DEF_HELPER_FLAGS_2(fmul8x16au
, TCG_CALL_CONST
| TCG_CALL_PURE
, i64
, i64
, i64
)
133 DEF_HELPER_FLAGS_2(fmul8sux16
, TCG_CALL_CONST
| TCG_CALL_PURE
, i64
, i64
, i64
)
134 DEF_HELPER_FLAGS_2(fmul8ulx16
, TCG_CALL_CONST
| TCG_CALL_PURE
, i64
, i64
, i64
)
135 DEF_HELPER_FLAGS_2(fmuld8sux16
, TCG_CALL_CONST
| TCG_CALL_PURE
, i64
, i64
, i64
)
136 DEF_HELPER_FLAGS_2(fmuld8ulx16
, TCG_CALL_CONST
| TCG_CALL_PURE
, i64
, i64
, i64
)
137 DEF_HELPER_FLAGS_2(fexpand
, TCG_CALL_CONST
| TCG_CALL_PURE
, i64
, i64
, i64
)
138 DEF_HELPER_FLAGS_3(pdist
, TCG_CALL_CONST
| TCG_CALL_PURE
, i64
, i64
, i64
, i64
)
139 DEF_HELPER_FLAGS_2(fpack16
, TCG_CALL_CONST
| TCG_CALL_PURE
, i32
, i64
, i64
)
140 DEF_HELPER_FLAGS_3(fpack32
, TCG_CALL_CONST
| TCG_CALL_PURE
, i64
, i64
, i64
, i64
)
141 DEF_HELPER_FLAGS_2(fpackfix
, TCG_CALL_CONST
| TCG_CALL_PURE
, i32
, i64
, i64
)
142 DEF_HELPER_FLAGS_3(bshuffle
, TCG_CALL_CONST
| TCG_CALL_PURE
, i64
, i64
, i64
, i64
)
143 #define VIS_HELPER(name) \
144 DEF_HELPER_FLAGS_2(f ## name ## 16, TCG_CALL_CONST | TCG_CALL_PURE, \
146 DEF_HELPER_FLAGS_2(f ## name ## 16s, TCG_CALL_CONST | TCG_CALL_PURE, \
148 DEF_HELPER_FLAGS_2(f ## name ## 32, TCG_CALL_CONST | TCG_CALL_PURE, \
150 DEF_HELPER_FLAGS_2(f ## name ## 32s, TCG_CALL_CONST | TCG_CALL_PURE, \
155 #define VIS_CMPHELPER(name) \
156 DEF_HELPER_FLAGS_2(f##name##16, TCG_CALL_CONST | TCG_CALL_PURE, \
158 DEF_HELPER_FLAGS_2(f##name##32, TCG_CALL_CONST | TCG_CALL_PURE, \
160 VIS_CMPHELPER(cmpgt
);
161 VIS_CMPHELPER(cmpeq
);
162 VIS_CMPHELPER(cmple
);
163 VIS_CMPHELPER(cmpne
);
168 DEF_HELPER_1(compute_psr
, void, env
);
169 DEF_HELPER_1(compute_C_icc
, i32
, env
);
171 #include "def-helper.h"