This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
PATCH: Use R*_LP on pointers in __longjmp.S and setjmp.S
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 14 May 2012 21:34:51 -0700
- Subject: PATCH: Use R*_LP on pointers in __longjmp.S and setjmp.S
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
This patch uses R*_LP on pointers in __longjmp.S and setjmp.S. Tested
on Linux/x86-64 and Linux/x32. OK to install?
Thanks.
H.J.
--
* sysdeps/x86_64/__longjmp.S: Use R*_LP on pointers.
* sysdeps/x86_64/setjmp.S: Likewise.
2011-11-21 H.J. Lu <hongjiu.lu@intel.com>
diff --git a/sysdeps/x86_64/__longjmp.S b/sysdeps/x86_64/__longjmp.S
index 3963f9c..a9a1a1e 100644
--- a/sysdeps/x86_64/__longjmp.S
+++ b/sysdeps/x86_64/__longjmp.S
@@ -29,9 +29,9 @@ ENTRY(__longjmp)
movq (JB_RBP*8)(%rdi),%r9
movq (JB_PC*8)(%rdi),%rdx
#ifdef PTR_DEMANGLE
- PTR_DEMANGLE (%r8)
- PTR_DEMANGLE (%r9)
- PTR_DEMANGLE (%rdx)
+ PTR_DEMANGLE (%R8_LP)
+ PTR_DEMANGLE (%R9_LP)
+ PTR_DEMANGLE (%RDX_LP)
#endif
/* We add unwind information for the target here. */
cfi_def_cfa(%rdi, 0)
diff --git a/sysdeps/x86_64/setjmp.S b/sysdeps/x86_64/setjmp.S
index 1902d14..953f6c2 100644
--- a/sysdeps/x86_64/setjmp.S
+++ b/sysdeps/x86_64/setjmp.S
@@ -25,7 +25,7 @@ ENTRY (__sigsetjmp)
movq %rbx, (JB_RBX*8)(%rdi)
#ifdef PTR_MANGLE
movq %rbp, %rax
- PTR_MANGLE (%rax)
+ PTR_MANGLE (%RAX_LP)
movq %rax, (JB_RBP*8)(%rdi)
#else
movq %rbp, (JB_RBP*8)(%rdi)
@@ -36,12 +36,12 @@ ENTRY (__sigsetjmp)
movq %r15, (JB_R15*8)(%rdi)
leaq 8(%rsp), %rdx /* Save SP as it will be after we return. */
#ifdef PTR_MANGLE
- PTR_MANGLE (%rdx)
+ PTR_MANGLE (%RDX_LP)
#endif
movq %rdx, (JB_RSP*8)(%rdi)
movq (%rsp), %rax /* Save PC we are returning to now. */
#ifdef PTR_MANGLE
- PTR_MANGLE (%rax)
+ PTR_MANGLE (%RAX_LP)
#endif
movq %rax, (JB_PC*8)(%rdi)
--
1.7.6.5