From: Andrew Waterman Date: Thu, 2 Feb 2017 07:18:00 +0000 (-0800) Subject: Use NaN macros X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e9951fc39dff4f4030cdfaaf479b936ae37799e2;p=riscv-tests.git Use NaN macros --- diff --git a/isa/rv64ud/fadd.S b/isa/rv64ud/fadd.S index 4a314da..71e7f82 100644 --- a/isa/rv64ud/fadd.S +++ b/isa/rv64ud/fadd.S @@ -30,7 +30,7 @@ RVTEST_CODE_BEGIN TEST_FP_OP2_D(10, fmul.d, 1, 3.14159265e-8, 3.14159265, 0.00000001 ); # Is the canonical NaN generated for Inf - Inf? - TEST_FP_OP2_D(11, fsub.d, 0x10, 0d:7ff8000000000000, Inf, Inf); + TEST_FP_OP2_D(11, fsub.d, 0x10, qNaN, Inf, Inf); TEST_PASSFAIL diff --git a/isa/rv64ud/fcmp.S b/isa/rv64ud/fcmp.S index 13bd39b..39e6023 100644 --- a/isa/rv64ud/fcmp.S +++ b/isa/rv64ud/fcmp.S @@ -28,15 +28,15 @@ RVTEST_CODE_BEGIN # 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) + TEST_FP_CMP_OP_D(10, feq.d, 0x10, 0, sNaN, 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(13, flt.d, 0x10, 0, sNaN, 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_FP_CMP_OP_D(16, fle.d, 0x10, 0, sNaN, 0) TEST_PASSFAIL diff --git a/isa/rv64uf/fadd.S b/isa/rv64uf/fadd.S index 800dc8c..b6259df 100644 --- a/isa/rv64uf/fadd.S +++ b/isa/rv64uf/fadd.S @@ -30,7 +30,7 @@ RVTEST_CODE_BEGIN TEST_FP_OP2_S(10, fmul.s, 1, 3.14159265e-8, 3.14159265, 0.00000001 ); # Is the canonical NaN generated for Inf - Inf? - TEST_FP_OP2_S(11, fsub.s, 0x10, 0f:7fc00000, Inf, Inf); + TEST_FP_OP2_S(11, fsub.s, 0x10, qNaNf, Inf, Inf); TEST_PASSFAIL diff --git a/isa/rv64uf/fcmp.S b/isa/rv64uf/fcmp.S index e77ca52..2d7fcc2 100644 --- a/isa/rv64uf/fcmp.S +++ b/isa/rv64uf/fcmp.S @@ -28,15 +28,15 @@ RVTEST_CODE_BEGIN # 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) + TEST_FP_CMP_OP_S(10, feq.s, 0x10, 0, sNaNf, 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(13, flt.s, 0x10, 0, sNaNf, 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_FP_CMP_OP_S(16, fle.s, 0x10, 0, sNaNf, 0) TEST_PASSFAIL