about summary refs log tree commit diff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-05-22 09:24:24 -0700
committerH.J. Lu <hjl.tools@gmail.com>2012-05-22 09:24:24 -0700
commitf63d5db67c5ac9da31e03e389fa454314ef96a35 (patch)
tree3a3012655b7404c9e8e165dfe6b6bea2d0f05437
parent98a61bcbca89e50a3bdfa92fa851546bccee41e7 (diff)
downloadglibc-f63d5db67c5ac9da31e03e389fa454314ef96a35.tar.gz
glibc-f63d5db67c5ac9da31e03e389fa454314ef96a35.tar.xz
glibc-f63d5db67c5ac9da31e03e389fa454314ef96a35.zip
Use "neg %eax" in i386 SYSCALL_ERROR_HANDLER
-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 */