1 # See LICENSE for license details.
3 #*****************************************************************************
5 #-----------------------------------------------------------------------------
7 # Test corner cases of John Hauser's microarchitectural recoding scheme.
8 # There are twice as many recoded values as IEEE-754 values; some of these
9 # extras are redundant (e.g. Inf) and others are illegal (subnormals with
13 #include "riscv_test.h"
14 #include "test_macros.h"
19 # Make sure infinities with different mantissas compare as equal.
23 TEST_CASE( 2, a0, 1, feq.s a0, f0, f1)
24 TEST_CASE( 3, a0, 1, fle.s a0, f0, f1)
25 TEST_CASE( 4, a0, 0, flt.s a0, f0, f1)
27 # Likewise, but for zeroes.
32 TEST_CASE(5, a0, 1, feq.d a0, f0, f1)
33 TEST_CASE(6, a0, 1, fle.d a0, f0, f1)
34 TEST_CASE(7, a0, 0, flt.d a0, f0, f1)
36 # When converting small doubles to single-precision subnormals,
37 # ensure that the extra precision is discarded.
44 TEST_CASE(10, a0, 0, sub a0, a0, a1)
46 # Make sure FSD+FLD correctly saves and restores a single-precision value.
52 TEST_CASE(20, a0, 1, feq.s a0, f0, f1)
64 small: .float 2.9133121e-37
65 tiny: .double 2.3860049081905093e-40