fclass.S revision 12771
1# See LICENSE for license details.
2
3#*****************************************************************************
4# fclass.S
5#-----------------------------------------------------------------------------
6#
7# Test fclass.s instructions.
8#
9
10#include "riscv_test.h"
11#include "test_macros.h"
12
13RVTEST_RV64UF
14RVTEST_CODE_BEGIN
15
16  #-------------------------------------------------------------
17  # Arithmetic tests
18  #-------------------------------------------------------------
19
20  TEST_FCLASS_S( 2, 1 << 0, 0xff800000 )
21  TEST_FCLASS_S( 3, 1 << 1, 0xbf800000 )
22  TEST_FCLASS_S( 4, 1 << 2, 0x807fffff )
23  TEST_FCLASS_S( 5, 1 << 3, 0x80000000 )
24  TEST_FCLASS_S( 6, 1 << 4, 0x00000000 )
25  TEST_FCLASS_S( 7, 1 << 5, 0x007fffff )
26  TEST_FCLASS_S( 8, 1 << 6, 0x3f800000 )
27  TEST_FCLASS_S( 9, 1 << 7, 0x7f800000 )
28  TEST_FCLASS_S(10, 1 << 8, 0x7f800001 )
29  TEST_FCLASS_S(11, 1 << 9, 0x7fc00000 )
30
31  TEST_PASSFAIL
32
33RVTEST_CODE_END
34
35  .data
36RVTEST_DATA_BEGIN
37
38  TEST_DATA
39
40RVTEST_DATA_END
41