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

Subversion Repositories fwrisc

[/] [fwrisc/] [trunk/] [ve/] [fwrisc/] [tests/] [riscv-compliance/] [riscv-test-suite/] [rv32uf/] [rv64uf/] [fdiv.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
# fdiv.S
5
#-----------------------------------------------------------------------------
6
#
7
# Test f{div|sqrt}.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,  fdiv.s, 1, 1.1557273520668288, 3.14159265, 2.71828182 );
24
  TEST_FP_OP2_S(3,  fdiv.s, 1,-0.9991093838555584,      -1234,     1235.1 );
25
  TEST_FP_OP2_S(4,  fdiv.s, 0,         3.14159265, 3.14159265,        1.0 );
26
 
27
  TEST_FP_OP1_S(5,  fsqrt.s, 1, 1.7724538498928541, 3.14159265 );
28
  TEST_FP_OP1_S(6,  fsqrt.s, 0,                100,      10000 );
29
 
30
  TEST_FP_OP1_S_DWORD_RESULT(7,  fsqrt.s, 0x10, 0x7FC00000, -1.0 );
31
 
32
  TEST_FP_OP1_S(8,  fsqrt.s, 1, 13.076696, 171.0);
33
 
34
  TEST_PASSFAIL
35
 
36
RVTEST_CODE_END
37
 
38
  .data
39
RV_COMPLIANCE_DATA_BEGIN
40
test_res:
41
    .fill 40, 4, -1
42
RV_COMPLIANCE_DATA_END
43
 

powered by: WebSVN 2.1.0

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