TEST_FP_OP_D_INTERNAL( testnum, flags, dword result, val1, 0.0, 0.0, \
inst a0, f0, rm)
-#define TEST_FP_CMP_OP_S( testnum, inst, result, val1, val2 ) \
- TEST_FP_OP_S_INTERNAL( testnum, 0, word result, val1, val2, 0.0, \
+#define TEST_FP_CMP_OP_S( testnum, inst, flags, result, val1, val2 ) \
+ TEST_FP_OP_S_INTERNAL( testnum, flags, word result, val1, val2, 0.0, \
inst a0, f0, f1)
-#define TEST_FP_CMP_OP_D( testnum, inst, result, val1, val2 ) \
- TEST_FP_OP_D_INTERNAL( testnum, 0, dword result, val1, val2, 0.0, \
+#define TEST_FP_CMP_OP_D( testnum, inst, flags, result, val1, val2 ) \
+ TEST_FP_OP_D_INTERNAL( testnum, flags, dword result, val1, val2, 0.0, \
inst a0, f0, f1)
#define TEST_FCLASS_S(testnum, correct, input) \
# Arithmetic tests
#-------------------------------------------------------------
- TEST_FP_CMP_OP_D( 2, feq.d, 1, -1.36, -1.36)
- TEST_FP_CMP_OP_D( 3, fle.d, 1, -1.36, -1.36)
- TEST_FP_CMP_OP_D( 4, flt.d, 0, -1.36, -1.36)
-
- TEST_FP_CMP_OP_D( 5, feq.d, 0, -1.37, -1.36)
- TEST_FP_CMP_OP_D( 6, fle.d, 1, -1.37, -1.36)
- TEST_FP_CMP_OP_D( 7, flt.d, 1, -1.37, -1.36)
+ TEST_FP_CMP_OP_D( 2, feq.d, 0x00, 1, -1.36, -1.36)
+ TEST_FP_CMP_OP_D( 3, fle.d, 0x00, 1, -1.36, -1.36)
+ TEST_FP_CMP_OP_D( 4, flt.d, 0x00, 0, -1.36, -1.36)
+
+ TEST_FP_CMP_OP_D( 5, feq.d, 0x00, 0, -1.37, -1.36)
+ TEST_FP_CMP_OP_D( 6, fle.d, 0x00, 1, -1.37, -1.36)
+ TEST_FP_CMP_OP_D( 7, flt.d, 0x00, 1, -1.37, -1.36)
+
+ # Only sNaN should signal invalid for feq.
+ TEST_FP_CMP_OP_D( 8, feq.d, 0x00, 0, NaN, 0)
+ TEST_FP_CMP_OP_D( 9, feq.d, 0x00, 0, NaN, NaN)
+ TEST_FP_CMP_OP_D(10, feq.d, 0x10, 0, 0d:7ff0000000000001, 0)
+
+ # qNaN should signal invalid for fle/flt.
+ TEST_FP_CMP_OP_D(11, flt.d, 0x10, 0, NaN, 0)
+ TEST_FP_CMP_OP_D(12, flt.d, 0x10, 0, NaN, NaN)
+ TEST_FP_CMP_OP_D(13, flt.d, 0x10, 0, 0d:7ff0000000000001, 0)
+ TEST_FP_CMP_OP_D(14, fle.d, 0x10, 0, NaN, 0)
+ TEST_FP_CMP_OP_D(15, fle.d, 0x10, 0, NaN, NaN)
+ TEST_FP_CMP_OP_D(16, fle.d, 0x10, 0, 0d:7ff0000000000001, 0)
TEST_PASSFAIL
# Arithmetic tests
#-------------------------------------------------------------
- TEST_FP_CMP_OP_S( 2, feq.s, 1, -1.36, -1.36)
- TEST_FP_CMP_OP_S( 3, fle.s, 1, -1.36, -1.36)
- TEST_FP_CMP_OP_S( 4, flt.s, 0, -1.36, -1.36)
-
- TEST_FP_CMP_OP_S( 5, feq.s, 0, -1.37, -1.36)
- TEST_FP_CMP_OP_S( 6, fle.s, 1, -1.37, -1.36)
- TEST_FP_CMP_OP_S( 7, flt.s, 1, -1.37, -1.36)
+ TEST_FP_CMP_OP_S( 2, feq.s, 0x00, 1, -1.36, -1.36)
+ TEST_FP_CMP_OP_S( 3, fle.s, 0x00, 1, -1.36, -1.36)
+ TEST_FP_CMP_OP_S( 4, flt.s, 0x00, 0, -1.36, -1.36)
+
+ TEST_FP_CMP_OP_S( 5, feq.s, 0x00, 0, -1.37, -1.36)
+ TEST_FP_CMP_OP_S( 6, fle.s, 0x00, 1, -1.37, -1.36)
+ TEST_FP_CMP_OP_S( 7, flt.s, 0x00, 1, -1.37, -1.36)
+
+ # Only sNaN should signal invalid for feq.
+ TEST_FP_CMP_OP_S( 8, feq.s, 0x00, 0, NaN, 0)
+ TEST_FP_CMP_OP_S( 9, feq.s, 0x00, 0, NaN, NaN)
+ TEST_FP_CMP_OP_S(10, feq.s, 0x10, 0, 0f:7f800001, 0)
+
+ # qNaN should signal invalid for fle/flt.
+ TEST_FP_CMP_OP_S(11, flt.s, 0x10, 0, NaN, 0)
+ TEST_FP_CMP_OP_S(12, flt.s, 0x10, 0, NaN, NaN)
+ TEST_FP_CMP_OP_S(13, flt.s, 0x10, 0, 0f:7f800001, 0)
+ TEST_FP_CMP_OP_S(14, fle.s, 0x10, 0, NaN, 0)
+ TEST_FP_CMP_OP_S(15, fle.s, 0x10, 0, NaN, NaN)
+ TEST_FP_CMP_OP_S(16, fle.s, 0x10, 0, 0f:7f800001, 0)
TEST_PASSFAIL