]> git.saurik.com Git - apple/xnu.git/blobdiff - libsyscall/custom/SYS.h
xnu-6153.141.1.tar.gz
[apple/xnu.git] / libsyscall / custom / SYS.h
index ff93f852a09ae7a4ad7e877058fbb7df184c6df0..ffc6a8f2e725d039dbd0ca96372aa6a4c2b59c7b 100644 (file)
@@ -228,9 +228,9 @@ LEAF(pseudo, 0)                                     ;\
 #endif
 
 #define MI_ENTRY_POINT(name)                           \
 #endif
 
 #define MI_ENTRY_POINT(name)                           \
+       .text                                                                   ;\
        .align 2        ;\
        .globl  name                                                    ;\
        .align 2        ;\
        .globl  name                                                    ;\
-       .text                                                                   ;\
 name:
 
 /* load the syscall number into r12 and trap */
 name:
 
 /* load the syscall number into r12 and trap */
@@ -425,6 +425,18 @@ pseudo:                                                                    ;\
 #include <mach/arm/vm_param.h>
 #include <mach/arm64/asm.h>
 
 #include <mach/arm/vm_param.h>
 #include <mach/arm64/asm.h>
 
+#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:
  *
 /*
  * ARM64 system call interface:
  *
@@ -438,6 +450,7 @@ pseudo:                                                                     ;\
    PUSH_FRAME                  %%\
    bl    _##cerror             %%\
    POP_FRAME                   %%\
    PUSH_FRAME                  %%\
    bl    _##cerror             %%\
    POP_FRAME                   %%\
+   ret                                 %%\
 2:                     
 
 #define MI_GET_ADDRESS(reg,var)  \
 2:                     
 
 #define MI_GET_ADDRESS(reg,var)  \