fmadd.S revision 12771
112771Sqtt2@cornell.edu# See LICENSE for license details.
212771Sqtt2@cornell.edu
312771Sqtt2@cornell.edu#*****************************************************************************
412771Sqtt2@cornell.edu# fmadd.S
512771Sqtt2@cornell.edu#-----------------------------------------------------------------------------
612771Sqtt2@cornell.edu#
712771Sqtt2@cornell.edu# Test f[n]m{add|sub}.s and f[n]m{add|sub}.d instructions.
812771Sqtt2@cornell.edu#
912771Sqtt2@cornell.edu
1012771Sqtt2@cornell.edu#include "riscv_test.h"
1112771Sqtt2@cornell.edu#include "test_macros.h"
1212771Sqtt2@cornell.edu
1312771Sqtt2@cornell.eduRVTEST_RV64UF
1412771Sqtt2@cornell.eduRVTEST_CODE_BEGIN
1512771Sqtt2@cornell.edu
1612771Sqtt2@cornell.edu  #-------------------------------------------------------------
1712771Sqtt2@cornell.edu  # Arithmetic tests
1812771Sqtt2@cornell.edu  #-------------------------------------------------------------
1912771Sqtt2@cornell.edu
2012771Sqtt2@cornell.edu  TEST_FP_OP3_S( 2,  fmadd.s, 0,                 3.5,  1.0,        2.5,        1.0 );
2112771Sqtt2@cornell.edu  TEST_FP_OP3_S( 3,  fmadd.s, 1,              1236.2, -1.0,    -1235.1,        1.1 );
2212771Sqtt2@cornell.edu  TEST_FP_OP3_S( 4,  fmadd.s, 0,               -12.0,  2.0,       -5.0,       -2.0 );
2312771Sqtt2@cornell.edu
2412771Sqtt2@cornell.edu  TEST_FP_OP3_S( 5, fnmadd.s, 0,                -3.5,  1.0,        2.5,        1.0 );
2512771Sqtt2@cornell.edu  TEST_FP_OP3_S( 6, fnmadd.s, 1,             -1236.2, -1.0,    -1235.1,        1.1 );
2612771Sqtt2@cornell.edu  TEST_FP_OP3_S( 7, fnmadd.s, 0,                12.0,  2.0,       -5.0,       -2.0 );
2712771Sqtt2@cornell.edu
2812771Sqtt2@cornell.edu  TEST_FP_OP3_S( 8,  fmsub.s, 0,                 1.5,  1.0,        2.5,        1.0 );
2912771Sqtt2@cornell.edu  TEST_FP_OP3_S( 9,  fmsub.s, 1,                1234, -1.0,    -1235.1,        1.1 );
3012771Sqtt2@cornell.edu  TEST_FP_OP3_S(10,  fmsub.s, 0,                -8.0,  2.0,       -5.0,       -2.0 );
3112771Sqtt2@cornell.edu
3212771Sqtt2@cornell.edu  TEST_FP_OP3_S(11, fnmsub.s, 0,                -1.5,  1.0,        2.5,        1.0 );
3312771Sqtt2@cornell.edu  TEST_FP_OP3_S(12, fnmsub.s, 1,               -1234, -1.0,    -1235.1,        1.1 );
3412771Sqtt2@cornell.edu  TEST_FP_OP3_S(13, fnmsub.s, 0,                 8.0,  2.0,       -5.0,       -2.0 );
3512771Sqtt2@cornell.edu
3612771Sqtt2@cornell.edu  TEST_PASSFAIL
3712771Sqtt2@cornell.edu
3812771Sqtt2@cornell.eduRVTEST_CODE_END
3912771Sqtt2@cornell.edu
4012771Sqtt2@cornell.edu  .data
4112771Sqtt2@cornell.eduRVTEST_DATA_BEGIN
4212771Sqtt2@cornell.edu
4312771Sqtt2@cornell.edu  TEST_DATA
4412771Sqtt2@cornell.edu
4512771Sqtt2@cornell.eduRVTEST_DATA_END
46