mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
Updated kassert to be an actual function, and used the __builtin_* functions for location data. Updated the panic handler protocol to include sending location data as three more parameters. Updated the serial panic handler to display that data along with the (optional) message.
19 lines
246 B
ArmAsm
19 lines
246 B
ArmAsm
%include "push_all.inc"
|
|
|
|
section .text
|
|
|
|
extern panic_handler
|
|
|
|
global _panic_entry
|
|
_panic_entry:
|
|
cli
|
|
push 0 ; NMI doesn't push an error code
|
|
push 2 ; NMI is int 2
|
|
push_all
|
|
mov r9, rsp
|
|
|
|
mov rax, [rsp + REGS.rip]
|
|
push rax
|
|
|
|
jmp panic_handler
|