summaryrefslogtreecommitdiff
path: root/bsp/sparkfun-redv/drivers/trap_gcc.S
blob: f12b7995f78d8f7c50d2b7387c7a9a36003d852b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "cpuport.h"

	.globl rt_hw_do_after_save_above
	.type rt_hw_do_after_save_above,@function
rt_hw_do_after_save_above:
	addi  sp, sp,  -4
    STORE ra,  0 * REGBYTES(sp)
    csrr  a0, mcause
    csrr  a1, mepc
    mv    a2, sp
    call  handle_trap
    LOAD  ra,  0 * REGBYTES(sp)
    addi  sp, sp,  4
    ret