diff options
author | Howard Mao <zhehao.mao@gmail.com> | 2016-06-22 15:37:33 -0700 |
---|---|---|
committer | Howard Mao <zhehao.mao@gmail.com> | 2016-06-22 15:40:11 -0700 |
commit | b6b5e81217c1f2a70ecb6883b1756859cd7bb999 (patch) | |
tree | 41341774233c656d85b56b0089e4e316df804eb7 /isa/rv64ud/fmadd.S | |
parent | 26cfab585c781f06e977800000efe097dee4613d (diff) | |
download | riscv-tests-b6b5e81217c1f2a70ecb6883b1756859cd7bb999.zip riscv-tests-b6b5e81217c1f2a70ecb6883b1756859cd7bb999.tar.gz riscv-tests-b6b5e81217c1f2a70ecb6883b1756859cd7bb999.tar.bz2 |
split up rv64uf and rv64ud isa tests
Diffstat (limited to 'isa/rv64ud/fmadd.S')
-rw-r--r-- | isa/rv64ud/fmadd.S | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/isa/rv64ud/fmadd.S b/isa/rv64ud/fmadd.S new file mode 100644 index 0000000..7a69aad --- /dev/null +++ b/isa/rv64ud/fmadd.S @@ -0,0 +1,45 @@ +# See LICENSE for license details. + +#***************************************************************************** +# fmadd.S +#----------------------------------------------------------------------------- +# +# Test f[n]m{add|sub}.s and f[n]m{add|sub}.d instructions. +# + +#include "riscv_test.h" +#include "test_macros.h" + +RVTEST_RV64UF +RVTEST_CODE_BEGIN + + #------------------------------------------------------------- + # Arithmetic tests + #------------------------------------------------------------- + + TEST_FP_OP3_D( 2, fmadd.d, 0, 3.5, 1.0, 2.5, 1.0 ); + TEST_FP_OP3_D( 3, fmadd.d, 1, 1236.1999999999999, -1.0, -1235.1, 1.1 ); + TEST_FP_OP3_D( 4, fmadd.d, 0, -12.0, 2.0, -5.0, -2.0 ); + + TEST_FP_OP3_D( 5, fnmadd.d, 0, -3.5, 1.0, 2.5, 1.0 ); + TEST_FP_OP3_D( 6, fnmadd.d, 1, -1236.1999999999999, -1.0, -1235.1, 1.1 ); + TEST_FP_OP3_D( 7, fnmadd.d, 0, 12.0, 2.0, -5.0, -2.0 ); + + TEST_FP_OP3_D( 8, fmsub.d, 0, 1.5, 1.0, 2.5, 1.0 ); + TEST_FP_OP3_D( 9, fmsub.d, 1, 1234, -1.0, -1235.1, 1.1 ); + TEST_FP_OP3_D(10, fmsub.d, 0, -8.0, 2.0, -5.0, -2.0 ); + + TEST_FP_OP3_D(11, fnmsub.d, 0, -1.5, 1.0, 2.5, 1.0 ); + TEST_FP_OP3_D(12, fnmsub.d, 1, -1234, -1.0, -1235.1, 1.1 ); + TEST_FP_OP3_D(13, fnmsub.d, 0, 8.0, 2.0, -5.0, -2.0 ); + + TEST_PASSFAIL + +RVTEST_CODE_END + + .data +RVTEST_DATA_BEGIN + + TEST_DATA + +RVTEST_DATA_END |