From 0e4c828a8ede9f6d51fb06f6feeedae3da7ef9ec Mon Sep 17 00:00:00 2001 From: Justine Tunney Date: Sun, 9 Jul 2023 16:52:08 -0700 Subject: [PATCH] Fix alignment of ftrace hook --- libc/runtime/ftrace-hook.S | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libc/runtime/ftrace-hook.S b/libc/runtime/ftrace-hook.S index 8425d5a15..d572254e4 100644 --- a/libc/runtime/ftrace-hook.S +++ b/libc/runtime/ftrace-hook.S @@ -33,10 +33,11 @@ ftrace_hook: and $-16,%rsp sub $256,%rsp push %rax + push %rbx + push %rcx + push %rdx push %rdi push %rsi - push %rdx - push %rcx push %r8 push %r9 push %r10 @@ -56,10 +57,11 @@ ftrace_hook: pop %r10 pop %r9 pop %r8 - pop %rcx - pop %rdx pop %rsi pop %rdi + pop %rdx + pop %rcx + pop %rbx pop %rax leave 1: ret