URL
https://opencores.org/ocsvn/eco32/eco32/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 14 |
Rev 157 |
;
|
;
|
; jalrtest.s -- test the special case 'jalr $31'
|
; jalrtest.s -- test the special case 'jalr $31'
|
;
|
;
|
|
|
; One of the following 4 possibilities is displayed:
|
; One of the following 4 possibilities is displayed:
|
; 0 = jump not executed, return address not stored in $31
|
; 0 = jump not executed, return address not stored in $31
|
; 1 = jump was executed, return address not stored in $31
|
; 1 = jump was executed, return address not stored in $31
|
; 2 = jump not executed, return address stored in $31
|
; 2 = jump not executed, return address stored in $31
|
; 3 = jump was executed, return address stored in $31
|
; 3 = jump was executed, return address stored in $31
|
|
|
.set io_base,0xF0300000
|
.set io_base,0xF0300000
|
|
|
add $16,$0,x
|
add $16,$0,x
|
add $31,$0,$16
|
add $31,$0,$16
|
jalr $31
|
jalr $31
|
add $4,$0,0
|
add $4,$0,0
|
j y
|
j y
|
x:
|
x:
|
add $4,$0,1
|
add $4,$0,1
|
y:
|
y:
|
beq $31,$16,z
|
beq $31,$16,z
|
add $4,$4,2
|
add $4,$4,2
|
z:
|
z:
|
add $4,$4,0x30
|
add $4,$4,0x30
|
jal out
|
jal out
|
halt:
|
halt:
|
j halt
|
j halt
|
|
|
out:
|
out:
|
add $8,$0,io_base
|
add $8,$0,io_base
|
out1:
|
out1:
|
ldw $9,$8,8
|
ldw $9,$8,8
|
and $9,$9,1
|
and $9,$9,1
|
beq $9,$0,out1
|
beq $9,$0,out1
|
stw $4,$8,12
|
stw $4,$8,12
|
jr $31
|
jr $31
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.