1 # See LICENSE for license details.
3 #*****************************************************************************
5 #-----------------------------------------------------------------------------
7 # Test f{div|sqrt}.{s|d} instructions.
10 #include "riscv_test.h"
11 #include "test_macros.h"
16 #-------------------------------------------------------------
18 #-------------------------------------------------------------
20 TEST_FP_OP2_S( 2, fdiv.s, 1, 1.1557273520668288, 3.14159265, 2.71828182 );
21 TEST_FP_OP2_S( 3, fdiv.s, 1,-0.9991093838555584, -1234, 1235.1 );
22 TEST_FP_OP2_S( 4, fdiv.s, 0, 3.14159265, 3.14159265, 1.0 );
24 TEST_FP_OP2_D( 5, fdiv.d, 1, 1.1557273520668288, 3.14159265, 2.71828182 );
25 TEST_FP_OP2_D( 6, fdiv.d, 1,-0.9991093838555584, -1234, 1235.1 );
26 TEST_FP_OP2_D( 7, fdiv.d, 0, 3.14159265, 3.14159265, 1.0 );
28 TEST_FP_OP1_S(11, fsqrt.s, 1, 1.7724538498928541, 3.14159265 );
29 TEST_FP_OP1_S(12, fsqrt.s, 0, 100, 10000 );
31 TEST_FP_OP1_D(13, fsqrt.d, 1, 1.7724538498928541, 3.14159265 );
32 TEST_FP_OP1_D(14, fsqrt.d, 0, 100, 10000 );