use trampoline to aign stack for call to rust panic

This commit is contained in:
janis 2025-10-31 14:52:59 +01:00
parent 402d295fff
commit d754f8c4b9
Signed by: janis
SSH key fingerprint: SHA256:bB1qbbqmDXZNT0KKD5c2Dfjg53JGhj7B3CFcLIzSqq8
2 changed files with 6 additions and 3 deletions

View file

@ -31,8 +31,6 @@ global is_whitespace
global is_id_continue global is_id_continue
global is_id_start global is_id_start
extern panic
;; ============================== ;; ==============================
;; Helper functions ;; Helper functions
;; ============================== ;; ==============================
@ -446,3 +444,8 @@ is_whitespace:
mov rax, 1 mov rax, 1
ret ret
extern panic_impl
global panic
panic:
and rsp, -16
call panic_impl

View file

@ -9,7 +9,7 @@ fn __do_panic() -> ! {
} }
#[unsafe(no_mangle)] #[unsafe(no_mangle)]
extern "C" fn panic() -> ! { extern "C" fn panic_impl() -> ! {
__do_panic() __do_panic()
} }