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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [hwtests/] [jalrtest/] [jalrtest.s] - Blame information for rev 14

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 14 hellwig
;
2
; jalrtest.s -- test the special case 'jalr $31'
3
;
4
 
5
; One of the following 4 possibilities is displayed:
6
;   0 = jump not executed, return address not stored in $31
7
;   1 = jump was executed, return address not stored in $31
8
;   2 = jump not executed, return address stored in $31
9
;   3 = jump was executed, return address stored in $31
10
 
11
        .set    io_base,0xF0300000
12
 
13
        add     $16,$0,x
14
        add     $31,$0,$16
15
        jalr    $31
16
        add     $4,$0,0
17
        j       y
18
x:
19
        add     $4,$0,1
20
y:
21
        beq     $31,$16,z
22
        add     $4,$4,2
23
z:
24
        add     $4,$4,0x30
25
        jal     out
26
halt:
27
        j       halt
28
 
29
out:
30
        add     $8,$0,io_base
31
out1:
32
        ldw     $9,$8,8
33
        and     $9,$9,1
34
        beq     $9,$0,out1
35
        stw     $4,$8,12
36
        jr      $31

powered by: WebSVN 2.1.0

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