1 # See LICENSE for license details.
3 #*****************************************************************************
5 #-----------------------------------------------------------------------------
7 # Test f{div|sqrt}.s 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_OP1_S(5, fsqrt.s, 1, 1.7724538498928541, 3.14159265 );
25 TEST_FP_OP1_S(6, fsqrt.s, 0, 100, 10000 );
27 TEST_FP_OP1_S_DWORD_RESULT(7, fsqrt.s, 0x10, 0x7FC00000, -1.0 );
29 TEST_FP_OP1_S(8, fsqrt.s, 1, 13.076696, 171.0);