Fix ma_fetch to work with or without RVC
[riscv-tests.git] / isa / rv64uf / fsgnj.S
1 # See LICENSE for license details.
2
3 #*****************************************************************************
4 # fsgnj.S
5 #-----------------------------------------------------------------------------
6 #
7 # Test fsgn{j|jn|x}.{s|d} instructions.
8 #
9
10 #include "riscv_test.h"
11 #include "test_macros.h"
12
13 RVTEST_RV64UF
14 RVTEST_CODE_BEGIN
15
16 #-------------------------------------------------------------
17 # Arithmetic tests
18 #-------------------------------------------------------------
19
20 TEST_FP_OP2_S( 2, fsgnj.s, 0, -6.3, 6.3, -1.0 );
21 TEST_FP_OP2_S( 3, fsgnj.s, 0, 7.3, 7.3, 2.0 );
22 TEST_FP_OP2_S( 4, fsgnj.s, 0, -8.3, -8.3, -3.0 );
23 TEST_FP_OP2_S( 5, fsgnj.s, 0, 9.3, -9.3, 4.0 );
24
25 TEST_FP_OP2_S(12, fsgnjn.s, 0, 6.3, 6.3, -1.0 );
26 TEST_FP_OP2_S(13, fsgnjn.s, 0, -7.3, 7.3, 2.0 );
27 TEST_FP_OP2_S(14, fsgnjn.s, 0, 8.3, -8.3, -3.0 );
28 TEST_FP_OP2_S(15, fsgnjn.s, 0, -9.3, -9.3, 4.0 );
29
30 TEST_FP_OP2_S(22, fsgnjx.s, 0, -6.3, 6.3, -1.0 );
31 TEST_FP_OP2_S(23, fsgnjx.s, 0, 7.3, 7.3, 2.0 );
32 TEST_FP_OP2_S(24, fsgnjx.s, 0, 8.3, -8.3, -3.0 );
33 TEST_FP_OP2_S(25, fsgnjx.s, 0, -9.3, -9.3, 4.0 );
34
35 TEST_FP_OP2_D(32, fsgnj.d, 0, -6.3, 6.3, -1.0 );
36 TEST_FP_OP2_D(33, fsgnj.d, 0, 7.3, 7.3, 2.0 );
37 TEST_FP_OP2_D(34, fsgnj.d, 0, -8.3, -8.3, -3.0 );
38 TEST_FP_OP2_D(35, fsgnj.d, 0, 9.3, -9.3, 4.0 );
39
40 TEST_FP_OP2_D(42, fsgnjn.d, 0, 6.3, 6.3, -1.0 );
41 TEST_FP_OP2_D(43, fsgnjn.d, 0, -7.3, 7.3, 2.0 );
42 TEST_FP_OP2_D(44, fsgnjn.d, 0, 8.3, -8.3, -3.0 );
43 TEST_FP_OP2_D(45, fsgnjn.d, 0, -9.3, -9.3, 4.0 );
44
45 TEST_FP_OP2_D(52, fsgnjx.d, 0, -6.3, 6.3, -1.0 );
46 TEST_FP_OP2_D(53, fsgnjx.d, 0, 7.3, 7.3, 2.0 );
47 TEST_FP_OP2_D(54, fsgnjx.d, 0, 8.3, -8.3, -3.0 );
48 TEST_FP_OP2_D(55, fsgnjx.d, 0, -9.3, -9.3, 4.0 );
49
50 TEST_PASSFAIL
51
52 RVTEST_CODE_END
53
54 .data
55 RVTEST_DATA_BEGIN
56
57 TEST_DATA
58
59 RVTEST_DATA_END