5 #define CMOVR(N, T, OP, I0, I1, V, R0, R1, R2) \
10 beqi OP##T##N##r_##R0##R1##R2 %R0 V \
12 OP##T##N##r_##R0##R1##R2:
14 /* reg0 = reg1 op reg0 */
15 #define CMOVR1(N, T, OP, I0, I1, V, R0, R1, R2) \
19 OP##r##T %R0 %R1 %R0 \
20 beqr OP##T##N##r_1##R0##R1##R2 %R0 %R2 \
22 OP##T##N##r_1##R0##R1##R2:
24 #define TEST_CMOV1(N, OP, I0, I1, V, R0, R1, R2) \
25 CMOVR(N, , OP, I0, I1, V, R0, R1, R2) \
26 CMOVR1(N, , OP, I0, I1, V, R0, R1, R2) \
28 #define TEST_CMOV(N, OP, I0, I1, V) \
29 TEST_CMOV1(N, OP, I0, I1, V, v0, v1, v2) \
30 TEST_CMOV1(N, OP, I0, I1, V, v0, v1, r0) \
31 TEST_CMOV1(N, OP, I0, I1, V, v0, v1, r1) \
32 TEST_CMOV1(N, OP, I0, I1, V, v0, v1, r2) \
33 TEST_CMOV1(N, OP, I0, I1, V, v1, v2, r1) \
34 TEST_CMOV1(N, OP, I0, I1, V, v1, v2, r2) \
35 TEST_CMOV1(N, OP, I0, I1, V, v2, r0, r1) \
36 TEST_CMOV1(N, OP, I0, I1, V, v2, r0, r2) \
37 TEST_CMOV1(N, OP, I0, I1, V, r0, r1, r2)
39 #define MOVZR(N, I0, I1, V) TEST_CMOV(N, movz, I0, I1, V)
40 #define MOVNR(N, I0, I1, V) TEST_CMOV(N, movn, I0, I1, V)
45 MOVZR(0, 0x0, 0x0, 0x0)
46 MOVZR(1, 0xf7de, 0x0, 0xf7de)
48 MOVZR(2, 0x0, 0xdead, 0xdead)
49 MOVZR(3, 0xf7de, 0xdead, 0xdead)
51 MOVNR(0, 0x0, 0x0, 0x0)
52 MOVNR(1, 0xf7de, 0x0, 0x0)
54 MOVNR(2, 0x0, 0xdead, 0x0)
55 MOVNR(3, 0xf7de, 0xdead, 0xf7de)