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

Subversion Repositories potato

[/] [potato/] [trunk/] [tests/] [sw-jal.S] - Blame information for rev 58

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 skordal
# The Potato Processor - A simple RISC-V based processor for FPGAs
2
# (c) Kristian Klomsten Skordal 2014 - 2015 
3
# Report bugs and issues on 
4
 
5
#include "riscv_test.h"
6
#include "test_macros.h"
7
 
8
.section .text
9 58 skordal
RVTEST_RV32M
10 30 skordal
RVTEST_CODE_BEGIN
11
 
12
test_1:
13
        li TESTNUM, 1
14
 
15
        la ra, test_failed
16
        la sp, temp
17
        sw ra, 0(sp)
18
        jal ra, test_cmp
19
 
20
1:
21
        j fail
22
        j pass
23
 
24
test_cmp:
25
        la t0, 1b
26
        bne ra, t0, fail
27
        addi ra, ra, 4
28
        ret
29
 
30
TEST_PASSFAIL
31
RVTEST_CODE_END
32
 
33
test_failed:
34
        RVTEST_FAIL
35
 
36 58 skordal
.section .data
37
RVTEST_DATA_BEGIN
38
        TEST_DATA
39
 
40 30 skordal
# Allocate a 32-bit word to store some data into
41 58 skordal
#.section .data
42 30 skordal
temp:
43
        .word 0x00000000
44
 
45 58 skordal
RVTEST_DATA_END
46 30 skordal
 

powered by: WebSVN 2.1.0

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