Use "neg %eax" in i386 SYSCALL_ERROR_HANDLER

This commit is contained in:
H.J. Lu 2012-05-22 09:24:24 -07:00
parent 98a61bcbca
commit f63d5db67c
2 changed files with 9 additions and 9 deletions

View File

@ -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>

View File

@ -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 */