Files
eb001/tb/sw/src/startup.S

55 lines
559 B
ArmAsm
Raw Normal View History

2024-10-28 15:51:12 +08:00
#include "custom_ops.S"
2024-10-28 18:01:25 +08:00
.extern main
.globl _prog_start
.section .text.init
2024-10-28 15:51:12 +08:00
2024-10-28 18:01:25 +08:00
_prog_start:
li x15, 0
picorv32_maskirq_insn(zero, zero)
call main
2024-10-28 15:51:12 +08:00
2024-10-28 18:01:25 +08:00
li gp, 1;
ecall
2024-10-28 15:51:12 +08:00
2024-10-28 18:01:25 +08:00
.balign 32
.section .trap_entry
trap_entry:
2024-10-28 18:01:25 +08:00
# q0 return address
# q1 bitmask of all IRQ to be handled, may be more than one IRQ
# q2 q3 unused, can be use as temp storage register
# q Without the q-registers, the irq return address will be stored in x3 (gp) and the IRQ bitmask in x4 (tp),
addi x15, x4, 0
picorv32_retirq_insn()