12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- #include "sys.h"
- #include "picorv32.h"
- // The linker ensures that section .init is first
- .section ".init","ax"
- .org 0
- .globl _reset
- _reset:
- li sp,SRAM_SIZE
- j _start
- .org 0x10
- .globl __irq
- __irq:
- add sp,sp,-64
- sw ra,0(sp)
- sw t0,4(sp)
- sw t1,8(sp)
- sw t2,12(sp)
- sw t3,16(sp)
- sw t4,20(sp)
- sw t5,24(sp)
- sw t6,28(sp)
- sw a0,32(sp)
- sw a1,36(sp)
- sw a2,40(sp)
- sw a3,44(sp)
- sw a4,48(sp)
- sw a5,52(sp)
- sw a6,56(sp)
- sw a7,60(sp)
- getq a0,q1
- jal _irq
- lw ra,0(sp)
- lw t0,4(sp)
- lw t1,8(sp)
- lw t2,12(sp)
- lw t3,16(sp)
- lw t4,20(sp)
- lw t5,24(sp)
- lw t6,28(sp)
- lw a0,32(sp)
- lw a1,36(sp)
- lw a2,40(sp)
- lw a3,44(sp)
- lw a4,48(sp)
- lw a5,52(sp)
- lw a6,56(sp)
- lw a7,60(sp)
- add sp,sp,64
- retirq
|