6 # define w7f 0x7fffffff
7 # define w80 0x80000000
8 # define w81 0x80000001
9 # define wff 0xffffffff
10 # define LEXTII2(N, R0, R1)
11 # define LEXTIC2(N, R0)
13 # define w7f 0x7fffffffffffffff
14 # define w80 0x8000000000000000
15 # define w81 0x8000000000000001
16 # define wff 0xffffffffffffffff
18 # define ui7f 0xffffffff
24 # define uiff 0xffffffff
25 # define LEXTII2(N, R0, R1) \
26 EXTII2(N, i, R0, R1) \
28 # define LEXTIC2(N, R0) \
49 #define EXTII2(N, T, R0, R1) \
52 beqi T##_##R0##_##R1##_##N %R1 T##N \
54 T##_##R0##_##R1##_##N:
55 #define EXTII1(N, R0, R1) \
56 EXTII2(N, c, R0, R1) \
57 EXTII2(N, uc, R0, R1) \
58 EXTII2(N, s, R0, R1) \
59 EXTII2(N, us, R0, R1) \
61 #define EXTII0(R0, R1) \
67 #define EXTIC2(N, T, R0) \
70 beqi T##_##R0##_##N %R0 T##N \
73 #define EXTIC1(N, R0) \
85 #define EXTII(V0, V1, V2, R0, R1, R2) \
123 #define EXIF1(N, V, R0, R1) \
126 beqi_f wf##_##R0##_##R1##_##N %R1 V \
127 wf##_##R0##_##R1##_##N:
128 #define EXIF0(R0, R1) \
129 EXIF1(0, -1, R0, R1) \
131 #define EXIF(V0, V1, V2, R0, R1, R2, F0, F1, F2, F3, F4, F5) \
138 #define EXID1(N, V, R0, R1) \
141 beqi_d wd##_##R0##_##R1##_##N %R1 V \
142 wd##_##R0##_##R1##_##N:
143 #define EXID0(R0, R1) \
144 EXID1(0, -1, R0, R1) \
146 #define EXID(V0, V1, V2, R0, R1, R2, F0, F1, F2, F3, F4, F5) \
154 #define EXFI1(N, V, R0, R1) \
157 beqi fi##_##R0##_##R1##_##N %R0 V \
159 fi##_##R0##_##R1##_##N:
160 #define EXFI0(R0, R1) \
161 EXFI1(0, 42, R0, R1) \
162 EXFI1(1, -128, R0, R1)
163 #define EXFI(V0, V1, V2, R0, R1, R2, F0, F1, F2, F3, F4, F5) \
170 #define EXDI1(N, V, R0, R1) \
173 beqi di##_##R0##_##R1##_##N %R0 V \
175 di##_##R0##_##R1##_##N:
176 #define EXDI0(R0, R1) \
177 EXDI1(0, 42, R0, R1) \
178 EXDI1(1, -128, R0, R1)
179 #define EXDI(V0, V1, V2, R0, R1, R2, F0, F1, F2, F3, F4, F5) \
187 #define LEXFI1(N, V, R0, R1) \
190 andi %R0 %R0 0xffffffff \
191 beqi lfi##_##R0##_##R1##_##N %R0 $(V & 0xffffffff) \
193 lfi##_##R0##_##R1##_##N:
194 #define LEXFI0(R0, R1) \
195 LEXFI1(0, 42, R0, R1) \
196 LEXFI1(1, -128, R0, R1)
197 #define LEXFI(V0, V1, V2, R0, R1, R2, F0, F1, F2, F3, F4, F5) \
204 #define LEXDI1(N, V, R0, R1) \
207 andi %R0 %R0 0xffffffff \
208 beqi ldi##_##R0##_##R1##_##N %R0 $(V & 0xffffffff) \
210 ldi##_##R0##_##R1##_##N:
211 #define LEXDI0(R0, R1) \
212 LEXDI1(0, 42, R0, R1) \
213 LEXDI1(1, -128, R0, R1)
214 #define LEXDI(V0, V1, V2, R0, R1, R2, F0, F1, F2, F3, F4, F5) \
222 #define EXTFD2(V, R0, R1) \
225 beqi_d fd##_##R0##_##R1 %R1 V \
228 #define EXTFD1(R0, R1) \
230 #define EXTFDC2(V, R0) \
233 beqi_d fdc##_##R0 %R0 V \
236 #define EXTFDC1(R0) \
238 #define EXTFD(R0, R1, R2, R3, R4, R5) \
251 #define EXTDF2(V, R0, R1) \
254 beqi_f df##_##R0##_##R1 %R1 V \
257 #define EXTDF1(R0, R1) \
259 #define EXTDFC2(V, R0) \
262 beqi_f dfc##_##R0 %R0 V \
265 #define EXTDFC1(R0) \
267 #define EXTDF(R0, R1, R2, R3, R4, R5) \
280 #define MVFW(R0, F0, F1) \
284 beqr_f fw##R0##F0##F1 %F0 %F1 \
287 #define FW(R0, R1, R2, R3, R4, R5, F0, F1, F2, F3, F4, F5) \
294 #define MVFWI(R0, F0, F1) \
298 beqr_f ifw##R0##F0##F1 %F0 %F1 \
301 #define FWI(R0, R1, R2, R3, R4, R5, F0, F1, F2, F3, F4, F5) \
310 # define MVDW(R0, R1, F0, F1) \
312 movr_d_ww %R0 %R1 %F0 \
313 movr_ww_d %F1 %R0 %R1 \
314 beqr_d dw##R0##R1##F0##F1 %F0 %F1 \
317 # define DW(R0, R1, R2, R3, R4, R5, F0, F1, F2, F3, F4, F5) \
318 MVDW(R0, R1, F0, F1) \
319 MVDW(R1, R2, F1, F2) \
320 MVDW(R2, R3, F2, F3) \
321 MVDW(R3, R4, F3, F4) \
322 MVDW(R4, R5, F4, F5) \
324 # define MVDWI(R0, R1, F0, F1) \
326 movi_d_ww %R0 %R1 0.25 \
327 movr_ww_d %F0 %R0 %R1 \
328 beqr_d idw##R0##R1##F0##F1 %F0 %F1 \
331 # define DWI(R0, R1, R2, R3, R4, R5, F0, F1, F2, F3, F4, F5) \
332 MVDWI(R0, R1, F0, F1) \
333 MVDWI(R1, R2, F1, F2) \
334 MVDWI(R2, R3, F2, F3) \
335 MVDWI(R3, R4, F3, F4) \
336 MVDWI(R4, R5, F4, F5) \
337 MVDWI(R5, R0, F5, F0)
339 # define MVDW(R0, F0, F1) \
343 beqr_d dw##R0##F0##F1 %F0 %F1 \
346 # define DW(R0, R1, R2, R3, R4, R5, F0, F1, F2, F3, F4, F5) \
353 # define MVDWI(R0, F0, F1) \
357 beqr_d idw##R0##F0##F1 %F0 %F1 \
360 # define DWI(R0, R1, R2, R3, R4, R5, F0, F1, F2, F3, F4, F5) \
369 #define MVWFI(F0, F1) \
371 movi_w_f %F0 0x3e800000 \
372 beqr_f iwf##F0##F1 %F0 %F1 \
375 #define WFI(F0, F1, F2, F3, F4, F5) \
384 # define MVWDI(F0, F1) \
386 movi_ww_d %F0 0 0x3fe00000 \
387 beqr_d iwwd##F0##F1 %F0 %F1 \
390 # define WDI(F0, F1, F2, F3, F4, F5) \
398 # define MVWDI(F0, F1) \
400 movi_w_d %F0 0x3fe0000000000000 \
401 beqr_d iwd##F0##F1 %F0 %F1 \
404 #define WDI(F0, F1, F2, F3, F4, F5) \
416 /* simple sequence for easier disassembly reading and encoding check */
472 andi %r0 %r0 0xffffffff
473 beqi yfi %r0 $(-128 & 0xffffffff)
478 andi %r0 %r0 0xffffffff
479 beqi ydi %r0 $(-128 & 0xffffffff)
507 movr_d_ww %r0 %r1 %f0
508 movr_ww_d %f1 %r0 %r1
513 movi_d_ww %r0 %r1 0.25
514 movr_ww_d %f0 %r0 %r1
534 movi_w_f %f0 0x3e800000
540 movi_ww_d %f0 0 0x3fe00000
546 movi_w_d %f0 0x3fe0000000000000
552 EXTII(v0, v1, v2, r0, r1, r2)
553 EXIF(v0, v1, v2, r0, r1, r2, f0, f1, f2, f3, f4, f5)
554 EXID(v0, v1, v2, r0, r1, r2, f0, f1, f2, f3, f4, f5)
555 EXFI(v0, v1, v2, r0, r1, r2, f0, f1, f2, f3, f4, f5)
557 LEXFI(v0, v1, v2, r0, r1, r2, f0, f1, f2, f3, f4, f5)
558 LEXDI(v0, v1, v2, r0, r1, r2, f0, f1, f2, f3, f4, f5)
560 EXDI(v0, v1, v2, r0, r1, r2, f0, f1, f2, f3, f4, f5)
561 EXTFD(f0, f1, f2, f3, f4, f5)
562 EXTDF(f0, f1, f2, f3, f4, f5)
563 FW(v0, v1, v2, r0, r1, r2, f0, f1, f2, f3, f4, f5)
564 FWI(v0, v1, v2, r0, r1, r2, f0, f1, f2, f3, f4, f5)
565 DW(v0, v1, v2, r0, r1, r2, f0, f1, f2, f3, f4, f5)
566 DWI(v0, v1, v2, r0, r1, r2, f0, f1, f2, f3, f4, f5)
567 WFI(f0, f1, f2, f3, f4, f5)
568 WDI(f0, f1, f2, f3, f4, f5)
570 // just to know did not abort