This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.15-1019-g1c87aba


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  1c87aba0f2949199382c193ae584fa034b49a0db (commit)
      from  c26705334c4f46420fff2d2cad4f3f37b51d7db6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1c87aba0f2949199382c193ae584fa034b49a0db

commit 1c87aba0f2949199382c193ae584fa034b49a0db
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed May 23 06:48:05 2012 -0700

    Fix x32 sched_getcpu.S error code

diff --git a/ChangeLog b/ChangeLog
index 87dc911..14f37cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-05-23  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* sysdeps/unix/sysv/linux/x86_64/x32/sched_getcpu.S: Rearrange
+	code so that pseudo_end is just ret and the stack pointer is
+	correct also for static library in error case.
+
 2012-05-23  Joseph Myers  <joseph@codesourcery.com>
 
 	* sysdeps/unix/sysv/linux/powerpc/chown.c: Add comment suggesting
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/sched_getcpu.S b/sysdeps/unix/sysv/linux/x86_64/x32/sched_getcpu.S
index f3ba9f1..789552e 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/sched_getcpu.S
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/sched_getcpu.S
@@ -33,14 +33,18 @@ ENTRY (sched_getcpu)
 
 	call	__getcpu
 
+	/* Local variable is result if the call is successful.  */
+	mov	(%rsp), %edx
+	/* Restore stack pointer before we might jump to
+	   SYSCALL_ERROR_LABEL which returns to the caller.  */
+	add	$0x8, %esp
+	cfi_adjust_cfa_offset(-8)
+
 	cmp	$-4095, %eax
 	jae	SYSCALL_ERROR_LABEL
 
-	mov	(%rsp), %eax
-
+	mov	%edx, %eax
 L(pseudo_end):
-	add	$0x8, %esp
-	cfi_adjust_cfa_offset(-8)
 	ret
 PSEUDO_END(sched_getcpu)
 #endif

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                         |    6 ++++++
 sysdeps/unix/sysv/linux/x86_64/x32/sched_getcpu.S |   12 ++++++++----
 2 files changed, 14 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]