/** Copyright 2021, Haiku, Inc.* Distributed under the terms of the MIT License.*/#include <arch_traps.h>.globl MVec.type MVec, @function.align 4MVec:PushTrapFramesd fp, 2*8(sp)csrr t0, mepcsd t0, 31*8(sp)mv a0, spcall MTrapld t0, 31*8(sp)csrw mepc, t0PopTrapFramemret.size MVec, .-MVec.globl MVecS.type MVecS, @function.align 4MVecS:csrrw sp, mscratch, spPushTrapFramecsrr t0, mscratchsd t0, 2*8(sp) # save supervisor SPcsrw mscratch, fpcsrr t0, mepcsd t0, 31*8(sp)la t0, MVeccsrw mtvec, t0mv a0, spcall MTrapla t0, MVecScsrw mtvec, t0ld t0, 31*8(sp)csrw mepc, t0PopTrapFramemret.size MVecS, .-MVecS