cosmopolitan/libc/sysv/errfuns/eintr.S
Justine Tunney eb40cb371d
Get --ftrace working on aarch64
This change implements a new approach to function call logging, that's
based on the GCC flag: -fpatchable-function-entry. Read the commentary
in build/config.mk to learn how it works.
2023-06-05 23:35:31 -07:00

18 lines
302 B
ArmAsm

#include "libc/macros.internal.h"
.text.unlikely
.ftrace1
eintr:
.ftrace2
#ifdef __x86_64__
.leafprologue
mov EINTR(%rip),%ecx
jmp __errfun
#elif defined(__aarch64__)
adrp x1,EINTR
ldrsw x0,[x1,#:lo12:EINTR]
b __errfun
#else
#error "unsupported architecture"
#endif
.endfn eintr,globl,hidden