1# See LICENSE for license details. 2 3#***************************************************************************** 4# fclass.S 5#----------------------------------------------------------------------------- 6# 7# Test fclass.d instruction. 8# 9 10#include "riscv_test.h" 11#include "test_macros.h" 12 13RVTEST_RV64UF 14RVTEST_CODE_BEGIN 15 16#if __riscv_xlen == 32 17 # Replace the function with the 32-bit variant defined in test_macros.h 18 #undef TEST_FCLASS_D 19 #define TEST_FCLASS_D TEST_FCLASS_D32 20#endif 21 22 #------------------------------------------------------------- 23 # Arithmetic tests 24 #------------------------------------------------------------- 25 26 TEST_FCLASS_D( 2, 1 << 0, 0xfff0000000000000 ) 27 TEST_FCLASS_D( 3, 1 << 1, 0xbff0000000000000 ) 28 TEST_FCLASS_D( 4, 1 << 2, 0x800fffffffffffff ) 29 TEST_FCLASS_D( 5, 1 << 3, 0x8000000000000000 ) 30 TEST_FCLASS_D( 6, 1 << 4, 0x0000000000000000 ) 31 TEST_FCLASS_D( 7, 1 << 5, 0x000fffffffffffff ) 32 TEST_FCLASS_D( 8, 1 << 6, 0x3ff0000000000000 ) 33 TEST_FCLASS_D( 9, 1 << 7, 0x7ff0000000000000 ) 34 TEST_FCLASS_D(10, 1 << 8, 0x7ff0000000000001 ) 35 TEST_FCLASS_D(11, 1 << 9, 0x7ff8000000000000 ) 36 37 TEST_PASSFAIL 38 39RVTEST_CODE_END 40 41 .data 42RVTEST_DATA_BEGIN 43 44 TEST_DATA 45 46RVTEST_DATA_END 47