diff options
author | Yunsup Lee <yunsup@cs.berkeley.edu> | 2013-04-22 14:56:59 -0700 |
---|---|---|
committer | Yunsup Lee <yunsup@cs.berkeley.edu> | 2013-04-22 14:56:59 -0700 |
commit | 81ad66f25ce4c15180e558696961bd8eaf967fea (patch) | |
tree | d70676fb1d11a4a66a268f7860d3ef7d469987fe /isa/rv64uf/fsgnj.S | |
download | riscv-tests-81ad66f25ce4c15180e558696961bd8eaf967fea.zip riscv-tests-81ad66f25ce4c15180e558696961bd8eaf967fea.tar.gz riscv-tests-81ad66f25ce4c15180e558696961bd8eaf967fea.tar.bz2 |
initial commit
Diffstat (limited to 'isa/rv64uf/fsgnj.S')
-rw-r--r-- | isa/rv64uf/fsgnj.S | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/isa/rv64uf/fsgnj.S b/isa/rv64uf/fsgnj.S new file mode 100644 index 0000000..0d2124b --- /dev/null +++ b/isa/rv64uf/fsgnj.S @@ -0,0 +1,57 @@ +#***************************************************************************** +# fsgnj.S +#----------------------------------------------------------------------------- +# +# Test fsgn{j|jn|x}.{s|d} instructions. +# + +#include "riscv_test.h" +#include "test_macros.h" + +RVTEST_RV64U +RVTEST_CODE_BEGIN + + #------------------------------------------------------------- + # Arithmetic tests + #------------------------------------------------------------- + + TEST_FP_OP2_S( 2, fsgnj.s, -6.3, 6.3, -1.0 ); + TEST_FP_OP2_S( 3, fsgnj.s, 7.3, 7.3, 2.0 ); + TEST_FP_OP2_S( 4, fsgnj.s, -8.3, -8.3, -3.0 ); + TEST_FP_OP2_S( 5, fsgnj.s, 9.3, -9.3, 4.0 ); + + TEST_FP_OP2_S(12, fsgnjn.s, 6.3, 6.3, -1.0 ); + TEST_FP_OP2_S(13, fsgnjn.s, -7.3, 7.3, 2.0 ); + TEST_FP_OP2_S(14, fsgnjn.s, 8.3, -8.3, -3.0 ); + TEST_FP_OP2_S(15, fsgnjn.s, -9.3, -9.3, 4.0 ); + + TEST_FP_OP2_S(22, fsgnjx.s, -6.3, 6.3, -1.0 ); + TEST_FP_OP2_S(23, fsgnjx.s, 7.3, 7.3, 2.0 ); + TEST_FP_OP2_S(24, fsgnjx.s, 8.3, -8.3, -3.0 ); + TEST_FP_OP2_S(25, fsgnjx.s, -9.3, -9.3, 4.0 ); + + TEST_FP_OP2_D(32, fsgnj.d, -6.3, 6.3, -1.0 ); + TEST_FP_OP2_D(33, fsgnj.d, 7.3, 7.3, 2.0 ); + TEST_FP_OP2_D(34, fsgnj.d, -8.3, -8.3, -3.0 ); + TEST_FP_OP2_D(35, fsgnj.d, 9.3, -9.3, 4.0 ); + + TEST_FP_OP2_D(42, fsgnjn.d, 6.3, 6.3, -1.0 ); + TEST_FP_OP2_D(43, fsgnjn.d, -7.3, 7.3, 2.0 ); + TEST_FP_OP2_D(44, fsgnjn.d, 8.3, -8.3, -3.0 ); + TEST_FP_OP2_D(45, fsgnjn.d, -9.3, -9.3, 4.0 ); + + TEST_FP_OP2_D(52, fsgnjx.d, -6.3, 6.3, -1.0 ); + TEST_FP_OP2_D(53, fsgnjx.d, 7.3, 7.3, 2.0 ); + TEST_FP_OP2_D(54, fsgnjx.d, 8.3, -8.3, -3.0 ); + TEST_FP_OP2_D(55, fsgnjx.d, -9.3, -9.3, 4.0 ); + + TEST_PASSFAIL + +RVTEST_CODE_END + + .data +RVTEST_DATA_BEGIN + + TEST_DATA + +RVTEST_DATA_END |