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

Subversion Repositories fwrisc

[/] [fwrisc/] [trunk/] [ve/] [fwrisc/] [tests/] [riscv-compliance/] [riscv-test-suite/] [rv32uf/] [rv64uf/] [fcvt.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
# fcvt.S
5
#-----------------------------------------------------------------------------
6
#
7
# Test fcvt.s.{wu|w|lu|l}, fcvt.s.d, and fcvt.d.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
RVTEST_RV64UF
16
RVTEST_CODE_BEGIN
17
 
18
  #-------------------------------------------------------------
19
  # Arithmetic tests
20
  #-------------------------------------------------------------
21
 
22
  TEST_INT_FP_OP_S( 2,  fcvt.s.w,                   2.0,  2);
23
  TEST_INT_FP_OP_S( 3,  fcvt.s.w,                  -2.0, -2);
24
 
25
  TEST_INT_FP_OP_S( 4, fcvt.s.wu,                   2.0,  2);
26
  TEST_INT_FP_OP_S( 5, fcvt.s.wu,           4.2949673e9, -2);
27
 
28
#if __riscv_xlen >= 64
29
  TEST_INT_FP_OP_S( 6,  fcvt.s.l,                   2.0,  2);
30
  TEST_INT_FP_OP_S( 7,  fcvt.s.l,                  -2.0, -2);
31
 
32
  TEST_INT_FP_OP_S( 8, fcvt.s.lu,                   2.0,  2);
33
  TEST_INT_FP_OP_S( 9, fcvt.s.lu,          1.8446744e19, -2);
34
#endif
35
 
36
  TEST_PASSFAIL
37
 
38
RVTEST_CODE_END
39
 
40
  .data
41
RV_COMPLIANCE_DATA_BEGIN
42
test_res:
43
    .fill 40, 4, -1
44
RV_COMPLIANCE_DATA_END
45
 

powered by: WebSVN 2.1.0

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