Commit | Line | Data |
---|---|---|
4a71579b PC |
1 | .data 8 |
2 | ok: | |
3 | .c "ok\n" | |
4 | ||
5 | /* r0,r1 = r2 op r3 */ | |
6 | #define QALUR(N, T, OP, I0, I1, LO, HI, R0, R1, R2, R3) \ | |
7 | movi %R2 I0 \ | |
8 | movi %R3 I1 \ | |
9 | OP##r##T %R0 %R1 %R2 %R3 \ | |
10 | bnei OP##T##N##rlo##R0##R1##R2##R3 %R0 LO \ | |
11 | bnei OP##T##N##rlo##R0##R1##R2##R3 %R1 HI \ | |
12 | bnei OP##T##N##rlo##R0##R1##R2##R3 %R2 I0 \ | |
13 | beqi OP##T##N##rhi##R0##R1##R2##R3 %R3 I1 \ | |
14 | OP##T##N##rlo##R0##R1##R2##R3: \ | |
15 | calli @abort \ | |
16 | OP##T##N##rhi##R0##R1##R2##R3: | |
17 | ||
18 | /* r0,r1 = r2 op i0 */ | |
19 | #define QALUI(N, T, OP, I0, I1, LO, HI, R0, R1, R2, R3) \ | |
20 | movi %R2 I0 \ | |
21 | movi %R3 HI \ | |
22 | OP##i##T %R0 %R1 %R2 I1 \ | |
23 | bnei OP##T##N##ilo##R0##R1##R2##R3 %R0 LO \ | |
24 | bner OP##T##N##ilo##R0##R1##R2##R3 %R1 %R3 \ | |
25 | beqi OP##T##N##ihi##R0##R1##R2##R3 %R2 I0 \ | |
26 | OP##T##N##ilo##R0##R1##R2##R3: \ | |
27 | calli @abort \ | |
28 | OP##T##N##ihi##R0##R1##R2##R3: | |
29 | ||
30 | /* r0,r1 = r0 op r1 */ | |
31 | #define QALUX(N, T, OP, I0, I1, LO, HI, R0, R1, R2, R3) \ | |
32 | movi %R0 I0 \ | |
33 | movi %R1 I1 \ | |
34 | movi %R2 LO \ | |
35 | movi %R3 HI \ | |
36 | OP##r##T %R0 %R1 %R0 %R1 \ | |
37 | bner OP##T##N##0lo##R0##R1##R2##R3 %R0 %R2 \ | |
38 | beqr OP##T##N##0hi##R0##R1##R2##R3 %R1 %R3 \ | |
39 | OP##T##N##0lo##R0##R1##R2##R3: \ | |
40 | calli @abort \ | |
41 | OP##T##N##0hi##R0##R1##R2##R3: | |
42 | ||
43 | /* r0,r1 = r1 op r0 */ | |
44 | #define QALUY(N, T, OP, I0, I1, LO, HI, R0, R1, R2, R3) \ | |
45 | movi %R1 I0 \ | |
46 | movi %R0 I1 \ | |
47 | movi %R2 LO \ | |
48 | movi %R3 HI \ | |
49 | OP##r##T %R0 %R1 %R1 %R0 \ | |
50 | bner OP##T##N##1lo##R0##R1##R2##R3 %R0 %R2 \ | |
51 | beqr OP##T##N##1hi##R0##R1##R2##R3 %R1 %R3 \ | |
52 | OP##T##N##1lo##R0##R1##R2##R3: \ | |
53 | calli @abort \ | |
54 | OP##T##N##1hi##R0##R1##R2##R3: | |
55 | ||
56 | /* r0,r1 = r0 op r3 */ | |
57 | #define QALUZ(N, T, OP, I0, I1, LO, HI, R0, R1, R2, R3) \ | |
58 | movi %R0 I0 \ | |
59 | movi %R3 I1 \ | |
60 | movi %R2 LO \ | |
61 | OP##r##T %R0 %R1 %R0 %R3 \ | |
62 | bner OP##T##N##2lo##R0##R1##R2##R3 %R0 %R2 \ | |
63 | bnei OP##T##N##2lo##R0##R1##R2##R3 %R1 HI \ | |
64 | beqi OP##T##N##2hi##R0##R1##R2##R3 %R3 I1 \ | |
65 | OP##T##N##2lo##R0##R1##R2##R3: \ | |
66 | calli @abort \ | |
67 | OP##T##N##2hi##R0##R1##R2##R3: | |
68 | ||
69 | /* r0,r1 = r2 op r1 */ | |
70 | #define QALUW(N, T, OP, I0, I1, LO, HI, R0, R1, R2, R3) \ | |
71 | movi %R2 I0 \ | |
72 | movi %R1 I1 \ | |
73 | movi %R3 LO \ | |
74 | OP##r##T %R0 %R1 %R2 %R1 \ | |
75 | bner OP##T##N##3lo##R0##R1##R2##R3 %R0 %R3 \ | |
76 | bnei OP##T##N##3lo##R0##R1##R2##R3 %R1 HI \ | |
77 | beqi OP##T##N##3hi##R0##R1##R2##R3 %R2 I0 \ | |
78 | OP##T##N##3lo##R0##R1##R2##R3: \ | |
79 | calli @abort \ | |
80 | OP##T##N##3hi##R0##R1##R2##R3: | |
81 | ||
82 | #define QALU2(N, T, OP, I0, I1, LO, HI, R0, R1, R2, R3) \ | |
83 | QALUR(N, T, OP, I0, I1, LO, HI, R0, R1, R2, R3) \ | |
84 | QALUI(N, T, OP, I0, I1, LO, HI, R0, R1, R2, R3) \ | |
85 | QALUX(N, T, OP, I0, I1, LO, HI, R0, R1, R2, R3) \ | |
86 | QALUY(N, T, OP, I0, I1, LO, HI, R0, R1, R2, R3) \ | |
87 | QALUZ(N, T, OP, I0, I1, LO, HI, R0, R1, R2, R3) \ | |
88 | QALUW(N, T, OP, I0, I1, LO, HI, R0, R1, R2, R3) | |
89 | ||
90 | #define QALU1(N, T, OP, I0, I1, LO, HI, R0, R1, R2, R3) \ | |
91 | QALU2(N, T, OP, I0, I1, LO, HI, R0, R1, R2, R3) \ | |
92 | QALU2(N, T, OP, I0, I1, LO, HI, R0, R1, R3, R2) \ | |
93 | QALU2(N, T, OP, I0, I1, LO, HI, R0, R2, R1, R3) \ | |
94 | QALU2(N, T, OP, I0, I1, LO, HI, R0, R2, R3, R1) \ | |
95 | QALU2(N, T, OP, I0, I1, LO, HI, R0, R3, R1, R2) \ | |
96 | QALU2(N, T, OP, I0, I1, LO, HI, R0, R3, R2, R1) \ | |
97 | QALU2(N, T, OP, I0, I1, LO, HI, R1, R0, R2, R3) \ | |
98 | QALU2(N, T, OP, I0, I1, LO, HI, R1, R0, R3, R2) \ | |
99 | QALU2(N, T, OP, I0, I1, LO, HI, R1, R2, R0, R3) \ | |
100 | QALU2(N, T, OP, I0, I1, LO, HI, R1, R2, R3, R0) \ | |
101 | QALU2(N, T, OP, I0, I1, LO, HI, R1, R3, R0, R2) \ | |
102 | QALU2(N, T, OP, I0, I1, LO, HI, R1, R3, R2, R0) \ | |
103 | QALU2(N, T, OP, I0, I1, LO, HI, R2, R1, R0, R3) \ | |
104 | QALU2(N, T, OP, I0, I1, LO, HI, R2, R1, R3, R0) \ | |
105 | QALU2(N, T, OP, I0, I1, LO, HI, R2, R0, R1, R3) \ | |
106 | QALU2(N, T, OP, I0, I1, LO, HI, R2, R0, R3, R1) \ | |
107 | QALU2(N, T, OP, I0, I1, LO, HI, R2, R3, R1, R0) \ | |
108 | QALU2(N, T, OP, I0, I1, LO, HI, R2, R3, R0, R1) \ | |
109 | QALU2(N, T, OP, I0, I1, LO, HI, R3, R1, R2, R0) \ | |
110 | QALU2(N, T, OP, I0, I1, LO, HI, R3, R1, R0, R2) \ | |
111 | QALU2(N, T, OP, I0, I1, LO, HI, R3, R2, R1, R0) \ | |
112 | QALU2(N, T, OP, I0, I1, LO, HI, R3, R2, R0, R1) \ | |
113 | QALU2(N, T, OP, I0, I1, LO, HI, R3, R0, R1, R2) \ | |
114 | QALU2(N, T, OP, I0, I1, LO, HI, R3, R0, R2, R1) | |
115 | ||
116 | #define QALU(N, T, OP, I0, I1, LO, HI) \ | |
117 | QALU1(N, T, OP, I0, I1, LO, HI, v0, v1, v2, r0) \ | |
118 | QALU1(N, T, OP, I0, I1, LO, HI, v0, v1, v2, r1) \ | |
119 | QALU1(N, T, OP, I0, I1, LO, HI, v0, v1, v2, r2) \ | |
120 | QALU1(N, T, OP, I0, I1, LO, HI, v1, v2, r0, r1) \ | |
121 | QALU1(N, T, OP, I0, I1, LO, HI, v1, v2, r0, r2) \ | |
122 | QALU1(N, T, OP, I0, I1, LO, HI, v2, r0, r1, r2) |