mirror of git://sourceware.org/git/glibc.git
Optimize ____longjmp_chk for x86-64 a bit.
This commit is contained in:
parent
85d9d2f3a0
commit
07df809969
|
@ -66,14 +66,12 @@ ENTRY(____longjmp_chk)
|
||||||
cmpq %r8, %rsp
|
cmpq %r8, %rsp
|
||||||
jbe .Lok
|
jbe .Lok
|
||||||
|
|
||||||
subq $32, %rsp
|
subq $24, %rsp
|
||||||
cfi_adjust_cfa_offset(32)
|
cfi_adjust_cfa_offset(24)
|
||||||
movq %r10, 24(%rsp)
|
|
||||||
xorl %edi, %edi
|
xorl %edi, %edi
|
||||||
movq %rsp, %rsi
|
movq %rsp, %rsi
|
||||||
movl $__NR_sigaltstack, %eax
|
movl $__NR_sigaltstack, %eax
|
||||||
syscall
|
syscall
|
||||||
movq 24(%rsp), %r10
|
|
||||||
testl %eax, %eax
|
testl %eax, %eax
|
||||||
movl $0, %eax
|
movl $0, %eax
|
||||||
jne .Lok
|
jne .Lok
|
||||||
|
@ -127,7 +125,7 @@ ENTRY(____longjmp_chk)
|
||||||
|
|
||||||
.Lfail: xchgq %r8, %rsp
|
.Lfail: xchgq %r8, %rsp
|
||||||
/* We want the stack trace to show that of the caller. */
|
/* We want the stack trace to show that of the caller. */
|
||||||
cfi_def_cfa(%rsp, 40)
|
cfi_def_cfa(%rsp, 32)
|
||||||
cfi_restore(%rsp)
|
cfi_restore(%rsp)
|
||||||
cfi_register(%rbp, %r9)
|
cfi_register(%rbp, %r9)
|
||||||
cfi_restore(%rip)
|
cfi_restore(%rip)
|
||||||
|
|
Loading…
Reference in New Issue