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

Subversion Repositories fwrisc

[/] [fwrisc/] [trunk/] [ve/] [fwrisc/] [tests/] [riscv-compliance/] [riscv-test-suite/] [rv32uf/] [rv64uf/] [fmin.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
# fmin.S
5
#-----------------------------------------------------------------------------
6
#
7
# Test f{min|max}.s instructinos.
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
RVTEST_RV64UF
16
RVTEST_CODE_BEGIN
17
 
18
  #-------------------------------------------------------------
19
  # Arithmetic tests
20
  #-------------------------------------------------------------
21
 
22
  TEST_FP_OP2_S( 2,  fmin.s, 0,        1.0,        2.5,        1.0 );
23
  TEST_FP_OP2_S( 3,  fmin.s, 0,    -1235.1,    -1235.1,        1.1 );
24
  TEST_FP_OP2_S( 4,  fmin.s, 0,    -1235.1,        1.1,    -1235.1 );
25
  TEST_FP_OP2_S( 5,  fmin.s, 0,    -1235.1,        NaN,    -1235.1 );
26
  TEST_FP_OP2_S( 6,  fmin.s, 0, 0.00000001, 3.14159265, 0.00000001 );
27
  TEST_FP_OP2_S( 7,  fmin.s, 0,       -2.0,       -1.0,       -2.0 );
28
 
29
  TEST_FP_OP2_S(12,  fmax.s, 0,        2.5,        2.5,        1.0 );
30
  TEST_FP_OP2_S(13,  fmax.s, 0,        1.1,    -1235.1,        1.1 );
31
  TEST_FP_OP2_S(14,  fmax.s, 0,        1.1,        1.1,    -1235.1 );
32
  TEST_FP_OP2_S(15,  fmax.s, 0,    -1235.1,        NaN,    -1235.1 );
33
  TEST_FP_OP2_S(16,  fmax.s, 0, 3.14159265, 3.14159265, 0.00000001 );
34
  TEST_FP_OP2_S(17,  fmax.s, 0,       -1.0,       -1.0,       -2.0 );
35
 
36
  # FMIN(sNaN, x) = x
37
  TEST_FP_OP2_S(20,  fmax.s, 0x10, 1.0, sNaNf, 1.0);
38
  # FMIN(qNaN, qNaN) = canonical NaN
39
  TEST_FP_OP2_S(21,  fmax.s, 0x00, qNaNf, NaN, NaN);
40
 
41
  # -0.0 < +0.0
42
  TEST_FP_OP2_S(30,  fmin.s, 0,       -0.0,       -0.0,        0.0 );
43
  TEST_FP_OP2_S(31,  fmin.s, 0,       -0.0,        0.0,       -0.0 );
44
  TEST_FP_OP2_S(32,  fmax.s, 0,        0.0,       -0.0,        0.0 );
45
  TEST_FP_OP2_S(33,  fmax.s, 0,        0.0,        0.0,       -0.0 );
46
 
47
  TEST_PASSFAIL
48
 
49
RVTEST_CODE_END
50
 
51
  .data
52
RV_COMPLIANCE_DATA_BEGIN
53
test_res:
54
    .fill 40, 4, -1
55
RV_COMPLIANCE_DATA_END
56
 

powered by: WebSVN 2.1.0

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