OpenCores
URL https://opencores.org/ocsvn/fwrisc/fwrisc/trunk

Subversion Repositories fwrisc

[/] [fwrisc/] [trunk/] [ve/] [fwrisc/] [tests/] [riscv-compliance/] [riscv-test-suite/] [rv32uf/] [rv64uf/] [fadd.S] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 mballance
# See LICENSE for license details.
2
 
3
#*****************************************************************************
4
# fadd.S
5
#-----------------------------------------------------------------------------
6
#
7
# Test f{add|sub|mul}.s instructions.
8
#
9
 
10
#include "riscv_test.h"
11
#include "compliance_test.h"
12
#include "compliance_io.h"
13
#include "aw_test_macros.h"
14
 
15
 
16
RVTEST_RV64UF
17
RVTEST_CODE_BEGIN
18
 
19
  #-------------------------------------------------------------
20
  # Arithmetic tests
21
  #-------------------------------------------------------------
22
 
23
  TEST_FP_OP2_S( 2,  fadd.s, 0,                3.5,        2.5,        1.0 );
24
  TEST_FP_OP2_S( 3,  fadd.s, 1,              -1234,    -1235.1,        1.1 );
25
  TEST_FP_OP2_S( 4,  fadd.s, 1,         3.14159265, 3.14159265, 0.00000001 );
26
 
27
  TEST_FP_OP2_S( 5,  fsub.s, 0,                1.5,        2.5,        1.0 );
28
  TEST_FP_OP2_S( 6,  fsub.s, 1,              -1234,    -1235.1,       -1.1 );
29
  TEST_FP_OP2_S( 7,  fsub.s, 1,         3.14159265, 3.14159265, 0.00000001 );
30
 
31
  TEST_FP_OP2_S( 8,  fmul.s, 0,                2.5,        2.5,        1.0 );
32
  TEST_FP_OP2_S( 9,  fmul.s, 1,            1358.61,    -1235.1,       -1.1 );
33
  TEST_FP_OP2_S(10,  fmul.s, 1,      3.14159265e-8, 3.14159265, 0.00000001 );
34
 
35
  # Is the canonical NaN generated for Inf - Inf?
36
  TEST_FP_OP2_S(11,  fsub.s, 0x10, qNaNf, Inf, Inf);
37
 
38
  TEST_PASSFAIL
39
 
40
RVTEST_CODE_END
41
 
42
  .data
43
RV_COMPLIANCE_DATA_BEGIN
44
test_res:
45
    .fill 40, 4, -1
46
RV_COMPLIANCE_DATA_END
47
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.