12 .macro check_res fr, r
21 .macro test_op2_rm op, fr0, fr1, fr2, v0, v1, r
30 .macro test_op3_rm op, fr0, fr1, fr2, fr3, v0, v1, v2, r
40 .macro test_op2_ex op, fr0, fr1, fr2, v0, v1, rm, r
43 test_op2_rm \op, \fr0, \fr1, \fr2, \v0, \v1, \r
46 test_op2_rm \op, \fr0, \fr1, \fr2, \v0, \v1, \r
49 .macro test_op3_ex op, fr0, fr1, fr2, fr3, v0, v1, v2, rm, r
52 test_op3_rm \op, \fr0, \fr1, \fr2, \fr3, \v0, \v1, \v2, \r
55 test_op3_rm \op, \fr0, \fr1, \fr2, \fr3, \v0, \v1, \v2, \r
58 .macro test_op2 op, fr0, fr1, fr2, v0, v1, r0, r1, r2, r3
59 test_op2_ex \op, \fr0, \fr1, \fr2, \v0, \v1, 0, \r0
60 test_op2_ex \op, \fr0, \fr1, \fr2, \v0, \v1, 1, \r1
61 test_op2_ex \op, \fr0, \fr1, \fr2, \v0, \v1, 2, \r2
62 test_op2_ex \op, \fr0, \fr1, \fr2, \v0, \v1, 3, \r3
65 .macro test_op3 op, fr0, fr1, fr2, fr3, v0, v1, v2, r0, r1, r2, r3
66 test_op3_ex \op, \fr0, \fr1, \fr2, \fr3, \v0, \v1, \v2, 0, \r0
67 test_op3_ex \op, \fr0, \fr1, \fr2, \fr3, \v0, \v1, \v2, 1, \r1
68 test_op3_ex \op, \fr0, \fr1, \fr2, \fr3, \v0, \v1, \v2, 2, \r2
69 test_op3_ex \op, \fr0, \fr1, \fr2, \fr3, \v0, \v1, \v2, 3, \r3
72 .macro test_op2_cpe op
96 test_op2 add.s, f0, f1, f2, 0x3fc00000, 0x34400000, \
97 0x3fc00002, 0x3fc00001, 0x3fc00002, 0x3fc00001
98 test_op2 add.s, f3, f4, f5, 0x3fc00000, 0x34a00000, \
99 0x3fc00002, 0x3fc00002, 0x3fc00003, 0x3fc00002
101 /* MAX_FLOAT + MAX_FLOAT = +inf/MAX_FLOAT */
102 test_op2 add.s, f6, f7, f8, 0x7f7fffff, 0x7f7fffff, \
103 0x7f800000, 0x7f7fffff, 0x7f800000, 0x7f7fffff
107 /* 1 + +inf = +inf */
108 test_op2 add.s, f6, f7, f8, 0x3fc00000, 0x7f800000, \
109 0x7f800000, 0x7f800000, 0x7f800000, 0x7f800000
111 /* +inf + -inf = default NaN */
112 test_op2 add.s, f0, f1, f2, 0x7f800000, 0xff800000, \
113 0x7fc00000, 0x7fc00000, 0x7fc00000, 0x7fc00000
118 test_op2 add.s, f9, f10, f11, 0x3fc00000, 0x7fc00001, \
119 0x7fc00001, 0x7fc00001, 0x7fc00001, 0x7fc00001
120 test_op2 add.s, f12, f13, f14, 0x3fc00000, 0x7f800001, \
121 0x7f800001, 0x7f800001, 0x7f800001, 0x7f800001
123 /* NaN1 + NaN2 = NaN1 */
124 test_op2 add.s, f15, f0, f1, 0x7f800001, 0x7fbfffff, \
125 0x7f800001, 0x7f800001, 0x7f800001, 0x7f800001
126 test_op2 add.s, f2, f3, f4, 0x7fbfffff, 0x7f800001, \
127 0x7fbfffff, 0x7fbfffff, 0x7fbfffff, 0x7fbfffff
128 test_op2 add.s, f5, f6, f7, 0x7fc00001, 0x7fbfffff, \
129 0x7fc00001, 0x7fc00001, 0x7fc00001, 0x7fc00001
130 test_op2 add.s, f8, f9, f10, 0x7fbfffff, 0x7fc00001, \
131 0x7fbfffff, 0x7fbfffff, 0x7fbfffff, 0x7fbfffff
135 test_op2 sub.s, f0, f1, f0, 0x3f800001, 0x33800000, \
136 0x3f800000, 0x3f800000, 0x3f800001, 0x3f800000
137 test_op2 sub.s, f0, f1, f1, 0x3f800002, 0x33800000, \
138 0x3f800002, 0x3f800001, 0x3f800002, 0x3f800001
140 /* norm - norm = denorm */
141 test_op2 sub.s, f6, f7, f8, 0x00800001, 0x00800000, \
142 0x00000001, 0x00000001, 0x00000001, 0x00000001
146 test_op2 mul.s, f0, f1, f2, 0x3f800001, 0x3f800001, \
147 0x3f800002, 0x3f800002, 0x3f800003, 0x3f800002
149 /* MAX_FLOAT/2 * MAX_FLOAT/2 = +inf/MAX_FLOAT */
150 test_op2 mul.s, f6, f7, f8, 0x7f000000, 0x7f000000, \
151 0x7f800000, 0x7f7fffff, 0x7f800000, 0x7f7fffff
152 /* min norm * min norm = 0/denorm */
153 test_op2 mul.s, f6, f7, f8, 0x00800001, 0x00800000, \
154 0x00000000, 0x00000000, 0x00000001, 0x00000000
156 /* inf * 0 = default NaN */
157 test_op2 mul.s, f6, f7, f8, 0x7f800000, 0x00000000, \
158 0x7fc00000, 0x7fc00000, 0x7fc00000, 0x7fc00000
162 test_op3 madd.s, f0, f1, f2, f0, 0, 0x3f800001, 0x3f800001, \
163 0x3f800002, 0x3f800002, 0x3f800003, 0x3f800002
167 test_op3 msub.s, f0, f1, f2, f0, 0x3f800000, 0x3f800001, 0x3f800001, \
168 0xb4800000, 0xb4800000, 0xb4800000, 0xb4800001