1
0
mirror of https://gitlab.os-k.eu/os-k-team/kvisc.git synced 2023-08-25 14:05:46 +02:00
kvisc/ka/sys/intr/common.k
julianb0 89ed8fdc0d
vm
2019-08-03 17:41:44 +02:00

30 lines
517 B
Plaintext

; The OS/K Team licenses this file to you under the MIT license.
; See the LICENSE file in the project root for more information.
TrapHandlers.prolog:
mov rbp, rsp
; nx0 = caller's cr2
call RFS.LoadReg, r14, $cr2
; we don't preserve the r12 we got
mov r12, rax
mov rdx, zero
jmp rcx
TrapHandlers.epilog:
; TRAP return values: RAX-RDX
mov ax2, rax
call RFS.StoreReg, r14, $rax
mov ax2, rdx
call RFS.StoreReg, r14, $rdx
call IDT.DoneHandling, r13
iret