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

Subversion Repositories fwrisc

[/] [fwrisc/] [trunk/] [ve/] [fwrisc/] [tests/] [riscv-compliance/] [riscv-test-suite/] [rv32uf/] [rv64uf/] [recoding.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
# recoding.S
5
#-----------------------------------------------------------------------------
6
#
7
# Test corner cases of John Hauser's microarchitectural recoding scheme.
8
# There are twice as many recoded values as IEEE-754 values; some of these
9
# extras are redundant (e.g. Inf) and others are illegal (subnormals with
10
# too many bits set).
11
#
12
 
13
#include "riscv_test.h"
14
#include "compliance_test.h"
15
#include "compliance_io.h"
16
#include "aw_test_macros.h"
17
 
18
 
19
RVTEST_RV64UF
20
RVTEST_CODE_BEGIN
21
 
22
  # Make sure infinities with different mantissas compare as equal.
23
  flw f0, minf, a0
24
  flw f1, three, a0
25
  fmul.s f1, f1, f0
26
  TEST_CASE( 2, a0, 1, feq.s a0, f0, f1)
27
  TEST_CASE( 3, a0, 1, fle.s a0, f0, f1)
28
  TEST_CASE( 4, a0, 0, flt.s a0, f0, f1)
29
 
30
  # Likewise, but for zeroes.
31
  fcvt.s.w f0, x0
32
  li a0, 1
33
  fcvt.s.w f1, a0
34
  fmul.s f1, f1, f0
35
  TEST_CASE(5, a0, 1, feq.s a0, f0, f1)
36
  TEST_CASE(6, a0, 1, fle.s a0, f0, f1)
37
  TEST_CASE(7, a0, 0, flt.s a0, f0, f1)
38
 
39
  TEST_PASSFAIL
40
 
41
RVTEST_CODE_END
42
 
43
  .data
44
 
45
minf: .float -Inf
46
three: .float 3.0
47
 
48
RV_COMPLIANCE_DATA_BEGIN
49
test_res:
50
    .fill 40, 4, -1
51
RV_COMPLIANCE_DATA_END
52
 

powered by: WebSVN 2.1.0

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