X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/5ba3f43ea354af8ad55bea84372a2bc834d8757c..eb6b6ca394357805f2bdba989abae309f718b4d8:/libsyscall/custom/SYS.h diff --git a/libsyscall/custom/SYS.h b/libsyscall/custom/SYS.h index ff93f852a..ffc6a8f2e 100644 --- a/libsyscall/custom/SYS.h +++ b/libsyscall/custom/SYS.h @@ -228,9 +228,9 @@ LEAF(pseudo, 0) ;\ #endif #define MI_ENTRY_POINT(name) \ + .text ;\ .align 2 ;\ .globl name ;\ - .text ;\ name: /* load the syscall number into r12 and trap */ @@ -425,6 +425,18 @@ pseudo: ;\ #include #include +#if defined(__arm64__) && !defined(__LP64__) +#define ZERO_EXTEND(argnum) uxtw x ## argnum, w ## argnum +#else +#define ZERO_EXTEND(argnum) +#endif + +#if defined(__arm64__) && !defined(__LP64__) +#define SIGN_EXTEND(argnum) sxtw x ## argnum, w ## argnum +#else +#define SIGN_EXTEND(argnum) +#endif + /* * ARM64 system call interface: * @@ -438,6 +450,7 @@ pseudo: ;\ PUSH_FRAME %%\ bl _##cerror %%\ POP_FRAME %%\ + ret %%\ 2: #define MI_GET_ADDRESS(reg,var) \