CDISABLE is an internal function so need to pass-by-register
authorDavid Bartley <dtbartle@maltodextrin.csclub.uwaterloo.ca>
Sun, 31 Aug 2008 01:03:25 +0000 (01:03 +0000)
committerDavid Bartley <dtbartle@maltodextrin.csclub.uwaterloo.ca>
Sun, 31 Aug 2008 01:03:25 +0000 (01:03 +0000)
nptl/sysdeps/unix/sysv/solaris2/kopensolaris-gnu/i386/sysdep-cancel.h

index 517e991..2a12005 100644 (file)
@@ -32,6 +32,9 @@
 
 #if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
 
+/* Note that CDISABLE is an internal function, so we need to
+   pass-by-register (we pass the argument in %eax).  */
+
 # undef  PSEUDO
 # define PSEUDO(name, syscall_name, args)                      \
   .text;                                      \
     DO_CALL (syscall_name, args);                         \
     jnb 3f;                                                                            \
     pushl %eax; cfi_adjust_cfa_offset (4);  \
-    pushl %ecx; cfi_adjust_cfa_offset (4);  \
+    movl %ecx, %eax;                        \
     CDISABLE;                           \
-    addl $4, %esp; cfi_adjust_cfa_offset (-4);  \
     popl %eax; cfi_adjust_cfa_offset (-4);    \
     cmpl $ERESTART, %eax;                   \
     je L(restart_cancel);                                      \
     jmp SYSCALL_ERROR_LABEL;                           \
 3:                                                  \
     pushl %eax; cfi_adjust_cfa_offset (4);  \
-    pushl %ecx; cfi_adjust_cfa_offset (4);  \
+    movl %ecx, %eax;                        \
     CDISABLE;                           \
-    addl $4, %esp; cfi_adjust_cfa_offset (-4);  \
     popl %eax; cfi_adjust_cfa_offset (-4);    \
   L(pseudo_end):
 
     DO_CALL (syscall_name, args);                         \
     jnb 3f;                                                                            \
     pushl %eax; cfi_adjust_cfa_offset (4);  \
-    pushl %edx; cfi_adjust_cfa_offset (4);  \
+    movl %ecx, %eax;                        \
     CDISABLE;                           \
-    addl $4, %esp; cfi_adjust_cfa_offset (-4);  \
     popl %eax; cfi_adjust_cfa_offset (-4);    \
     cmpl $ERESTART, %eax;                   \
     je L(restart_cancel);                                      \
     jmp SYSCALL_ERROR_LABEL;                           \
 3:                                                                                     \
     pushl %eax; cfi_adjust_cfa_offset (4);  \
-    pushl %edx; cfi_adjust_cfa_offset (4);  \
+    movl %ecx, %eax;                        \
     CDISABLE;                           \
-    addl $4, %esp; cfi_adjust_cfa_offset (-4);  \
     popl %eax; cfi_adjust_cfa_offset (-4);    \
-    addl $4, %esp;                                     \
-    movl %ecx, 0(%esp);                                                        \
+    addl $4, %esp; cfi_adjust_cfa_offset (4);                        \
+    movl %edx, 0(%esp);                                                        \
   L(pseudo_end):