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

Subversion Repositories fwrisc

[/] [fwrisc/] [trunk/] [ve/] [fwrisc/] [tests/] [riscv-compliance/] [riscv-test-suite/] [rv32ui/] [rv64ui/] [jal.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
# jal.S
5
#-----------------------------------------------------------------------------
6
#
7
# Test jal instruction.
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
 
17
RVTEST_RV64U
18
RVTEST_CODE_BEGIN
19
 
20
  #-------------------------------------------------------------
21
  # Test 2: Basic test
22
  #-------------------------------------------------------------
23
 
24
test_2:
25
  li  TESTNUM, 2
26
  li  ra, 0
27
 
28
  jal x4, target_2
29
linkaddr_2:
30
  nop
31
  nop
32
 
33
  j fail
34
 
35
target_2:
36
  la  x2, linkaddr_2
37
  bne x2, x4, fail
38
 
39
  #-------------------------------------------------------------
40
  # Test delay slot instructions not executed nor bypassed
41
  #-------------------------------------------------------------
42
 
43
  TEST_CASE( 3, ra, 3, \
44
    li  ra, 1; \
45
    jal x0, 1f; \
46
    addi ra, ra, 1; \
47
    addi ra, ra, 1; \
48
    addi ra, ra, 1; \
49
    addi ra, ra, 1; \
50
1:  addi ra, ra, 1; \
51
    addi ra, ra, 1; \
52
  )
53
 
54
  TEST_PASSFAIL
55
 
56
RVTEST_CODE_END
57
 
58
  .data
59
RV_COMPLIANCE_DATA_BEGIN
60
test_res:
61
    .fill 10, 4, -1
62
RV_COMPLIANCE_DATA_END
63
 

powered by: WebSVN 2.1.0

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