cosmopolitan/libc/sysv/errfuns/etime.S
Justine Tunney 1422e96b4e
Introduce native support for MacOS ARM64
There's a new program named ape/ape-m1.c which will be used to build an
embeddable binary that can load ape and elf executables. The support is
mostly working so far, but still chasing down ABI issues.
2023-05-20 04:17:03 -07:00

17 lines
295 B
ArmAsm

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