mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-25 22:40:05 +00:00
Fix x86_64/sched_getcpu.S error code
Rearrange code so that pseudo_end is just ret and the stack pointer is correct also for static library in error case.
This commit is contained in:
parent
e2d6cea0a1
commit
7333835592
@ -1,3 +1,9 @@
|
||||
2012-05-22 Andreas Jaeger <aj@suse.de>
|
||||
|
||||
* sysdeps/unix/sysv/linux/x86_64/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-22 Paul Pluzhnikov <ppluzhnikov@google.com>
|
||||
|
||||
[BZ #14122]
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2007, 2011 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2007-2012 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -59,13 +59,17 @@ ENTRY (sched_getcpu)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Local variable is result if the call is successful. */
|
||||
movl (%rsp), %edx
|
||||
/* Restore stack pointer before we might jump to
|
||||
SYSCALL_ERROR_LABEL which returns to the caller. */
|
||||
add $0x8, %rsp
|
||||
cfi_adjust_cfa_offset(-8)
|
||||
|
||||
cmpq $-4095, %rax
|
||||
jae SYSCALL_ERROR_LABEL
|
||||
|
||||
movl (%rsp), %eax
|
||||
|
||||
movl %edx, %eax
|
||||
L(pseudo_end):
|
||||
add $0x8, %rsp
|
||||
cfi_adjust_cfa_offset(-8)
|
||||
ret
|
||||
PSEUDO_END(sched_getcpu)
|
||||
|
Loading…
Reference in New Issue
Block a user