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

Subversion Repositories fwrisc

[/] [fwrisc/] [trunk/] [ve/] [fwrisc/] [tests/] [riscv-compliance/] [riscv-test-suite/] [rv32ui/] [rv64ui/] [fence_i.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
# fence_i.S
5
#-----------------------------------------------------------------------------
6
#
7
# Test self-modifying code and the fence.i 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
li a3, 111
20
lh a0, insn
21
lh a1, insn+2
22
 
23
# test I$ hit
24
.align 6
25
sh a0, 1f, t0
26
sh a1, 1f+2, t0
27
fence.i
28
 
29
1: addi a3, a3, 222
30
TEST_CASE( 2, a3, 444, nop )
31
 
32
# test prefetcher hit
33
li a4, 100
34
1: addi a4, a4, -1
35
bnez a4, 1b
36
 
37
sh a0, 1f, t0
38
sh a1, 1f+2, t0
39
fence.i
40
 
41
.align 6
42
1: addi a3, a3, 555
43
TEST_CASE( 3, a3, 777, nop )
44
 
45
TEST_PASSFAIL
46
 
47
RVTEST_CODE_END
48
 
49
  .data
50
insn:
51
  addi a3, a3, 333
52
RV_COMPLIANCE_DATA_BEGIN
53
test_res:
54
    .fill 4, 4, -1
55
RV_COMPLIANCE_DATA_END
56
 
57
 

powered by: WebSVN 2.1.0

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