]> git.saurik.com Git - apple/xnu.git/blobdiff - libsyscall/custom/SYS.h
xnu-7195.50.7.100.1.tar.gz
[apple/xnu.git] / libsyscall / custom / SYS.h
index ffc6a8f2e725d039dbd0ca96372aa6a4c2b59c7b..f79354e16f95478ea445fb23f8734fc1ba8c1cdd 100644 (file)
@@ -334,6 +334,9 @@ name:
 #elif __SYSCALL_32BIT_ARG_BYTES == 36 
 #define SYSCALL(name, nargs, cerror)           SYSCALL_8(name, cerror)
 #define SYSCALL_NONAME(name, nargs, cerror)    SYSCALL_NONAME_8(name, cerror)
+#elif __SYSCALL_32BIT_ARG_BYTES == 40 
+#define SYSCALL(name, nargs, cerror)           SYSCALL_8(name, cerror)
+#define SYSCALL_NONAME(name, nargs, cerror)    SYSCALL_NONAME_8(name, cerror)
 #elif __SYSCALL_32BIT_ARG_BYTES == 44 
 #define SYSCALL(name, nargs, cerror)           SYSCALL_8(name, cerror)
 #define SYSCALL_NONAME(name, nargs, cerror)    SYSCALL_NONAME_8(name, cerror)
@@ -443,15 +446,16 @@ pseudo:                                                                   ;\
  * TBD
  */
 
-#define DO_SYSCALL(num, cerror)        \
-   mov   x16, #(num)    %%\
-   svc   #SWI_SYSCALL  %%\
-   b.cc  2f             %%\
-   PUSH_FRAME                  %%\
-   bl    _##cerror             %%\
-   POP_FRAME                   %%\
-   ret                                 %%\
-2:                     
+#define DO_SYSCALL(num, cerror)                 \
+       mov   x16, #(num)                     %%\
+       svc   #SWI_SYSCALL                    %%\
+       b.cc  2f                              %%\
+       ARM64_STACK_PROLOG                    %%\
+       PUSH_FRAME                            %%\
+       bl    _##cerror                       %%\
+       POP_FRAME                             %%\
+       ARM64_STACK_EPILOG                    %%\
+2:
 
 #define MI_GET_ADDRESS(reg,var)  \
    adrp        reg, var@page      %%\