1/*
2 * Copyright 2021, Haiku, Inc.
3 * Distributed under the terms of the MIT License.
4 */
5
6
7#include <arch_traps.h>
8
9
10.globl SVec
11.type  SVec, @function
12.align 4
13SVec:
14	PushTrapFrame
15	sd fp, 2*8(sp)
16	csrr t0, sepc
17	sd   t0, 31*8(sp)
18
19	mv a0, sp
20	call STrap
21
22	ld t0, 31*8(sp)
23	csrw sepc, t0
24	PopTrapFrame
25	sret
26.size	SVec, .-SVec
27