Use RAX_LP and "or" to operate on return value

This commit is contained in:
H.J. Lu 2012-05-18 11:05:56 -07:00
parent a88b64b9bb
commit 1b74487e90
3 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,10 @@
2012-05-18 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/unix/x86_64/sysdep.S: Use RAX_LP to access return
value. Use "or" to set return value to -1.
* sysdeps/unix/sysv/linux/x86_64/sysdep.S: Use RAX_LP to
negate return value.
2012-05-18 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com> 2012-05-18 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
* sysdeps/powerpc/powerpc32/power4/Makefile (CFLAGS-wordcopy.c, * sysdeps/powerpc/powerpc32/power4/Makefile (CFLAGS-wordcopy.c,

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2001, 2002 Free Software Foundation, Inc. /* Copyright (C) 2001-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -32,7 +32,7 @@
.text .text
ENTRY (__syscall_error) ENTRY (__syscall_error)
negq %rax neg %RAX_LP
#define __syscall_error __syscall_error_1 #define __syscall_error __syscall_error_1
#include <sysdeps/unix/x86_64/sysdep.S> #include <sysdeps/unix/x86_64/sysdep.S>

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2001,2002,2004,2005,2011,2012 Free Software Foundation, Inc. /* Copyright (C) 2001-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -34,7 +34,7 @@ __syscall_error:
/* We translate the system's EWOULDBLOCK error into EAGAIN. /* We translate the system's EWOULDBLOCK error into EAGAIN.
The GNU C library always defines EWOULDBLOCK==EAGAIN. The GNU C library always defines EWOULDBLOCK==EAGAIN.
EWOULDBLOCK_sys is the original number. */ EWOULDBLOCK_sys is the original number. */
cmpq $EWOULDBLOCK_sys, %rax /* Is it the old EWOULDBLOCK? */ cmp $EWOULDBLOCK_sys, %RAX_LP /* Is it the old EWOULDBLOCK? */
jne notb /* Branch if not. */ jne notb /* Branch if not. */
movl $EAGAIN, %eax /* Yes; translate it to EAGAIN. */ movl $EAGAIN, %eax /* Yes; translate it to EAGAIN. */
notb: notb:
@ -45,7 +45,7 @@ notb:
#else #else
movl %eax, %fs:C_SYMBOL_NAME(errno@TPOFF) movl %eax, %fs:C_SYMBOL_NAME(errno@TPOFF)
#endif #endif
movq $-1, %rax or $-1, %RAX_LP
ret ret
#undef __syscall_error #undef __syscall_error