about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--sysdeps/unix/sysv/linux/i386/sysdep.h15
2 files changed, 9 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index ee29e04166..1918d8bf0f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* sysdeps/unix/sysv/linux/i386/sysdep.h (SYSCALL_ERROR_HANDLER):
+	Use "neg %eax".
+
 	* time/mktime.c: Update copyright years.
 
 2012-05-22  Paul Eggert  <eggert@cs.ucla.edu>
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h
index e7d7103b96..6c4f778914 100644
--- a/sysdeps/unix/sysv/linux/i386/sysdep.h
+++ b/sysdeps/unix/sysv/linux/i386/sysdep.h
@@ -112,9 +112,8 @@
 #  define SYSCALL_ERROR_HANDLER						      \
 0:SETUP_PIC_REG(cx);							      \
   addl $_GLOBAL_OFFSET_TABLE_, %ecx;					      \
-  xorl %edx, %edx;							      \
-  subl %eax, %edx;							      \
-  movl %edx, rtld_errno@GOTOFF(%ecx);					      \
+  negl %eax;								      \
+  movl %eax, rtld_errno@GOTOFF(%ecx);					      \
   orl $-1, %eax;							      \
   jmp L(pseudo_end);
 
@@ -129,9 +128,8 @@
 0:SETUP_PIC_REG (cx);							      \
   addl $_GLOBAL_OFFSET_TABLE_, %ecx;					      \
   movl SYSCALL_ERROR_ERRNO@GOTNTPOFF(%ecx), %ecx;			      \
-  xorl %edx, %edx;							      \
-  subl %eax, %edx;							      \
-  SYSCALL_ERROR_HANDLER_TLS_STORE (%edx, %ecx);				      \
+  negl %eax;								      \
+  SYSCALL_ERROR_HANDLER_TLS_STORE (%eax, %ecx);				      \
   orl $-1, %eax;							      \
   jmp L(pseudo_end);
 #  ifndef NO_TLS_DIRECT_SEG_REFS
@@ -147,10 +145,9 @@
 #  define SYSCALL_ERROR_HANDLER						      \
 0:SETUP_PIC_REG(cx);							      \
   addl $_GLOBAL_OFFSET_TABLE_, %ecx;					      \
-  xorl %edx, %edx;							      \
-  subl %eax, %edx;							      \
+  negl %eax;								      \
   movl errno@GOT(%ecx), %ecx;						      \
-  movl %edx, (%ecx);							      \
+  movl %eax, (%ecx);							      \
   orl $-1, %eax;							      \
   jmp L(pseudo_end);
 # endif	/* _LIBC_REENTRANT */