trap_gcc.S 357 B

1234567891011121314151617
  1. #include "cpuport.h"
  2. .globl rt_hw_do_after_save_above
  3. .type rt_hw_do_after_save_above,@function
  4. rt_hw_do_after_save_above:
  5. addi sp, sp, -4
  6. STORE ra, 0 * REGBYTES(sp)
  7. csrr t1, mcause
  8. andi t1, t1, 0x3FF
  9. /* get ISR */
  10. la t2, interrupt_entry
  11. jalr t2
  12. LOAD ra, 0 * REGBYTES(sp)
  13. addi sp, sp, 4
  14. ret