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

Subversion Repositories fwrisc

[/] [fwrisc/] [trunk/] [ve/] [fwrisc/] [tests/] [riscv-compliance/] [riscv-test-suite/] [rv32ui/] [rv64ui/] [jalr.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
# jalr.S
5
#-----------------------------------------------------------------------------
6
#
7
# Test jalr 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
RVTEST_RV64U
17
RVTEST_CODE_BEGIN
18
 
19
  #-------------------------------------------------------------
20
  # Test 2: Basic test
21
  #-------------------------------------------------------------
22
 
23
test_2:
24
  li  TESTNUM, 2
25
  li  t0, 0
26
  la  t1, target_2
27
 
28
  jalr t0, t1, 0
29
linkaddr_2:
30
  j fail
31
 
32
target_2:
33
  la  t1, linkaddr_2
34
  bne t0, t1, fail
35
 
36
  #-------------------------------------------------------------
37
  # Bypassing tests
38
  #-------------------------------------------------------------
39
 
40
  TEST_JALR_SRC1_BYPASS( 4, 0, jalr );
41
  TEST_JALR_SRC1_BYPASS( 5, 1, jalr );
42
  TEST_JALR_SRC1_BYPASS( 6, 2, jalr );
43
 
44
  #-------------------------------------------------------------
45
  # Test delay slot instructions not executed nor bypassed
46
  #-------------------------------------------------------------
47
 
48
  .option push
49
  .align 2
50
  .option norvc
51
  TEST_CASE( 7, t0, 4, \
52
    li  t0, 1; \
53
    la  t1, 1f; \
54
    jr  t1, -4; \
55
    addi t0, t0, 1; \
56
    addi t0, t0, 1; \
57
    addi t0, t0, 1; \
58
    addi t0, t0, 1; \
59
1:  addi t0, t0, 1; \
60
    addi t0, t0, 1; \
61
  )
62
  .option pop
63
 
64
  TEST_PASSFAIL
65
 
66
RVTEST_CODE_END
67
 
68
  .data
69
RV_COMPLIANCE_DATA_BEGIN
70
test_res:
71
    .fill 10, 4, -1
72
RV_COMPLIANCE_DATA_END
73
 
74
 
75
 
76
 

powered by: WebSVN 2.1.0

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