From: H.J. Lu Date: Wed, 23 May 2012 13:48:05 +0000 (-0700) Subject: Fix x32 sched_getcpu.S error code X-Git-Tag: glibc-2.16-tps~193 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1c87aba0f2949199382c193ae584fa034b49a0db;p=platform%2Fupstream%2Fglibc.git 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 + + * 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 * 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