Rv32ud tests (#108)
[riscv-tests.git] / isa / rv64ud / fadd.S
index 4a314da0d7d7edf668374351c8b0f5b7c6caa639..51ca82db712d4fa083a99cb2a6275a5fec7471f6 100644 (file)
 RVTEST_RV64UF
 RVTEST_CODE_BEGIN
 
+#if __riscv_xlen == 32
+    # Replace the function with the 32-bit variant defined in test_macros.h
+    #undef TEST_FP_OP2_D
+    #define TEST_FP_OP2_D TEST_FP_OP2_D32
+#endif
+
   #-------------------------------------------------------------
   # Arithmetic tests
   #-------------------------------------------------------------
@@ -30,7 +36,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