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

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

[PATCH] PPC64 cfi update part 4


Removed the cfi directives from the epilogue as Alan Modra suggested.



2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>

	* sysdeps/powerpc/powerpc64/dl-trampoline.S (_dl_runtime_resolve,
	_dl_profile_resolve): Add CFI directives for stack and LR save.
	* sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Add CFI directives
	for stack.
	* sysdeps/powerpc/powerpc64/ppc-mcount.S (_mcount): Add CFI
	directives for stack and LR save.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S (__brk): Add CFI
	directives for stack.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S (__clone): Add CFI
	directives for stack.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S
	(__getcontext, __novec_getcontext): Add CFI directives for stack
	and LR save.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S
	(__makecontext): Add CFI directives for stack and LR save.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S
	(__setcontext, __novec_setcontext): Add CFI directives for stack
	and LR save.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
	(__swapcontext, __novec_swapcontext):  Add CFI directives for stack
	and LR save.

diff -urN libc24-cvstip-20060103/sysdeps/powerpc/powerpc64/dl-trampoline.S libc24/sysdeps/powerpc/powerpc64/dl-trampoline.S
--- libc24-cvstip-20060103/sysdeps/powerpc/powerpc64/dl-trampoline.S	2005-07-06 21:35:57.000000000 -0500
+++ libc24/sysdeps/powerpc/powerpc64/dl-trampoline.S	2006-01-04 14:06:52.189246480 -0600
@@ -1,5 +1,5 @@
 /* PLT trampolines.  PPC64 version.
-   Copyright (C) 2005 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006 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
@@ -14,8 +14,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
+   02110-1301 USA.  */
 
 #include <sysdep.h>
 #include <rtld-global-offsets.h>
@@ -31,6 +31,7 @@
 /* We need to save the registers used to pass parameters, ie. r3 thru
    r10; the registers are saved in a stack frame.  */
 	stdu	r1,-128(r1)
+	cfi_adjust_cfa_offset (128)
 	std	r3,48(r1)
 	mr	r3,r11
 	std	r4,56(r1)
@@ -44,6 +45,7 @@
 	std	r8,88(r1)
 /* Store the LR in the LR Save area of the previous frame.  */
 	std	r0,128+16(r1)
+	cfi_offset (lr, 16)
 	mfcr	r0
 	std	r9,96(r1)
 	std	r10,104(r1)
@@ -178,6 +180,7 @@
 /* We need to save the registers used to pass parameters, ie. r3 thru
    r10; the registers are saved in a stack frame.  */
 	stdu	r1,-FRAME_SIZE(r1)
+	cfi_adjust_cfa_offset (FRAME_SIZE)
 	std	r3,INT_PARMS+0(r1)
 	mr	r3,r11
 	std	r4,INT_PARMS+8(r1)
@@ -193,6 +196,7 @@
 /* XXX Do we have to do this?  */
 	la	r8,FRAME_SIZE(r1)
 	std	r5,FRAME_SIZE+16(r1)
+	cfi_offset (lr, 16)
 	std	r5,CALLING_LR(r1)
 	mfcr	r0
 	std	r9,INT_PARMS+48(r1)
diff -urN libc24-cvstip-20060103/sysdeps/powerpc/powerpc64/fpu/s_copysign.S libc24/sysdeps/powerpc/powerpc64/fpu/s_copysign.S
--- libc24-cvstip-20060103/sysdeps/powerpc/powerpc64/fpu/s_copysign.S	2005-05-26 09:30:44.000000000 -0500
+++ libc24/sysdeps/powerpc/powerpc64/fpu/s_copysign.S	2006-01-04 14:08:42.516249304 -0600
@@ -28,7 +28,11 @@
    copysign(x,y) returns a value with the magnitude of x and
    with the sign bit of y.  */
 	stdu	r1,-48(r1)
+	cfi_adjust_cfa_offset (48)
 	stfd	fp2,24(r1)
+	nop
+	nop
+	nop
 	ld	r3,24(r1)
 	cmpdi   r3,0
 	addi    r1,r1,48
diff -urN libc24-cvstip-20060103/sysdeps/powerpc/powerpc64/ppc-mcount.S libc24/sysdeps/powerpc/powerpc64/ppc-mcount.S
--- libc24-cvstip-20060103/sysdeps/powerpc/powerpc64/ppc-mcount.S	2004-12-14 15:21:02.000000000 -0600
+++ libc24/sysdeps/powerpc/powerpc64/ppc-mcount.S	2006-01-04 11:38:31.000000000 -0600
@@ -1,5 +1,5 @@
 /* PowerPC64-specific implementation of profiling support.
-   Copyright (C) 1997, 1999, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999, 2002, 2006 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
@@ -14,8 +14,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
+   02110-1301 USA.  */
 
 #include <sysdep.h>
 /* We don't need to save the parameter-passing registers as gcc takes
@@ -26,7 +26,9 @@
 	mflr		 r4
 	ld		 r11, 0(r1)
 	stdu		 r1,-112(r1)
+	cfi_adjust_cfa_offset (112)
 	std		 r4, 128(r1)
+	cfi_offset (lr, 16)
 	ld		 r3, 16(r11)
 	bl		 JUMPTARGET(__mcount_internal)
 	nop
diff -urN libc24-cvstip-20060103/sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S libc24/sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S
--- libc24-cvstip-20060103/sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S	2004-12-14 15:24:08.000000000 -0600
+++ libc24/sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S	2006-01-04 13:37:49.146297008 -0600
@@ -1,5 +1,5 @@
 /* brk system call for Linux.  PowerPC64 version.
-   Copyright (C) 1995,96,97,99, 2000, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1995,96,97,99, 2000,02, 2006 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
@@ -14,8 +14,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
+   02110-1301 USA.  */
 
 #include <sysdep.h>
 #define _ERRNO_H	1
@@ -33,6 +33,7 @@
 	DISCARD_BOUNDS (r3)	/* the bounds are meaningless, so toss 'em.  */
 
 	stdu    r1,-64(r1)
+	cfi_adjust_cfa_offset (64)
 	std	r3,48(r1)
 	DO_CALL(SYS_ify(brk))
 	ld     r6,48(r1)
diff -urN libc24-cvstip-20060103/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S libc24/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S
--- libc24-cvstip-20060103/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S	2004-12-15 14:37:06.000000000 -0600
+++ libc24/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S	2006-01-04 14:31:15.098179904 -0600
@@ -1,5 +1,5 @@
 /* Wrapper around clone system call.  PowerPC64 version.
-   Copyright (C) 1997,98,99,2000,02, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1997,98,99,2000,02,04, 2006 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
@@ -14,8 +14,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
+   02110-1301 USA.  */
 
 #include <sysdep.h>
 #define _ERRNO_H	1
@@ -48,6 +48,7 @@
 
 	/* Set up stack frame for parent.  */
 	stdu	r1,-80(r1)
+	cfi_adjust_cfa_offset (80)
 	std	r29,56(r1)
 	std	r30,64(r1)
 	std	r31,72(r1)
diff -urN libc24-cvstip-20060103/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S libc24/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S
--- libc24-cvstip-20060103/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S	2004-12-16 22:17:33.000000000 -0600
+++ libc24/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S	2006-01-04 14:32:22.681288192 -0600
@@ -1,5 +1,5 @@
 /* Save current context.
-   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2006 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
@@ -14,8 +14,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
+   02110-1301 USA.  */
 
 #include <sysdep.h>
 #include <rtld-global-offsets.h>
@@ -37,9 +37,11 @@
   mflr  r0
   std  r2,(SIGCONTEXT_GP_REGS+(PT_R2*8))(r3)
   std  r0,FRAME_LR_SAVE(r1)
+  cfi_offset (lr, FRAME_LR_SAVE)
   std  r0,(SIGCONTEXT_GP_REGS+(PT_LNK*8))(r3)
   std  r0,(SIGCONTEXT_GP_REGS+(PT_NIP*8))(r3)
   stdu  r1,-128(r1)
+  cfi_adjust_cfa_offset (128)
   std  r4,(SIGCONTEXT_GP_REGS+(PT_R4*8))(r3)
   std  r5,(SIGCONTEXT_GP_REGS+(PT_R5*8))(r3)
   std  r6,(SIGCONTEXT_GP_REGS+(PT_R6*8))(r3)
@@ -140,6 +142,7 @@
   /* If the kernel is not at least 2.4.21 then generate a ENOSYS stub.  */
   mflr r0
   std  r0,FRAME_LR_SAVE(r1)
+  cfi_offset (lr, FRAME_LR_SAVE)
   stdu r1,-128(r1)
   li   r3,ENOSYS
   bl   JUMPTARGET(__syscall_error)
@@ -175,9 +178,11 @@
   mflr  r0
   std  r2,(SIGCONTEXT_GP_REGS+(PT_R2*8))(r3)
   std  r0,FRAME_LR_SAVE(r1)
+  cfi_offset (lr, FRAME_LR_SAVE)
   std  r0,(SIGCONTEXT_GP_REGS+(PT_LNK*8))(r3)
   std  r0,(SIGCONTEXT_GP_REGS+(PT_NIP*8))(r3)
   stdu  r1,-128(r1)
+  cfi_adjust_cfa_offset (128)
   std  r4,(SIGCONTEXT_GP_REGS+(PT_R4*8))(r3)
   std  r5,(SIGCONTEXT_GP_REGS+(PT_R5*8))(r3)
   std  r6,(SIGCONTEXT_GP_REGS+(PT_R6*8))(r3)
@@ -387,7 +392,9 @@
   /* If the kernel is not at least 2.4.21 then generate a ENOSYS stub.  */
   mflr r0
   std  r0,FRAME_LR_SAVE(r1)
+  cfi_offset (lr, FRAME_LR_SAVE)
   stdu r1,-128(r1)
+  cfi_adjust_cfa_offset (128)
   li   r3,ENOSYS
   bl   JUMPTARGET(__syscall_error)
   nop
diff -urN libc24-cvstip-20060103/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S libc24/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S
--- libc24-cvstip-20060103/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S	2005-05-26 09:30:48.000000000 -0500
+++ libc24/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S	2006-01-04 14:33:44.752193280 -0600
@@ -1,5 +1,5 @@
 /* Create new context.
-   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2006 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
@@ -14,8 +14,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
+   02110-1301 USA.  */
 
 #include <sysdep.h>
 #include "kernel-features.h"
@@ -41,7 +41,9 @@
   /* Get the address of the target functions first parameter.  */
   addi  r6,r1,FRAME_PARM4_SAVE
   std   r0,FRAME_LR_SAVE(r1)
+  cfi_offset (lr, FRAME_LR_SAVE)
   stdu  r1,-128(r1)
+  cfi_adjust_cfa_offset (128)
 
   /* Get the ucontexts stack pointer and size.  Compute the top of stack
      and round down to a quadword boundary.  Then stack a dummy frame
@@ -168,7 +170,9 @@
   /* If the kernel is not at least 2.4.21 then generate a ENOSYS stub.  */
   mflr r0
   std  r0,FRAME_LR_SAVE(r1)
+  cfi_offset (lr, FRAME_LR_SAVE)
   stdu r1,-128(r1)
+  cfi_adjust_cfa_offset (128)
   li   r3,ENOSYS
   bl   JUMPTARGET(__syscall_error)
   nop
diff -urN libc24-cvstip-20060103/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S libc24/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S
--- libc24-cvstip-20060103/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S	2005-02-07 17:25:58.000000000 -0600
+++ libc24/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S	2006-01-04 14:40:52.182183096 -0600
@@ -1,5 +1,5 @@
 /* Switch to context.
-   Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2005, 2006 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
@@ -14,8 +14,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
+   02110-1301 USA.  */
 
 #include <sysdep.h>
 #include <rtld-global-offsets.h>
@@ -34,7 +34,9 @@
   mflr  r0
   std   r31,-8(1)
   std   r0,FRAME_LR_SAVE(r1)
+  cfi_offset (lr, FRAME_LR_SAVE)
   stdu  r1,-128(r1)
+  cfi_adjust_cfa_offset (128)
   mr    r31,r3
 
 /*
@@ -200,7 +202,9 @@
   mflr  r0
   std   r31,-8(1)
   std   r0,FRAME_LR_SAVE(r1)
+  cfi_offset (lr, FRAME_LR_SAVE)
   stdu  r1,-128(r1)
+  cfi_adjust_cfa_offset (128)
   mr    r31,r3
 
 /*
@@ -443,7 +447,9 @@
   /* If the kernel is not at least 2.4.21 then generate a ENOSYS stub.  */
   mflr r0
   std  r0,FRAME_LR_SAVE(r1)
+  cfi_offset (lr, FRAME_LR_SAVE)
   stdu r1,-128(r1)
+  cfi_adjust_cfa_offset (128)
   li   r3,ENOSYS
   bl   JUMPTARGET(__syscall_error)
   nop
diff -urN libc24-cvstip-20060103/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S libc24/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
--- libc24-cvstip-20060103/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S	2005-02-07 17:25:58.000000000 -0600
+++ libc24/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S	2006-01-04 14:41:49.590242376 -0600
@@ -1,5 +1,5 @@
 /* Save current context and install the given one.
-   Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2005, 2006 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
@@ -14,8 +14,8 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
+   02110-1301 USA.  */
 
 #include <sysdep.h>
 #include <rtld-global-offsets.h>
@@ -37,9 +37,11 @@
   std   r31,-8(1)
   std  r2,(SIGCONTEXT_GP_REGS+(PT_R2*8))(r3)
   std  r0,FRAME_LR_SAVE(r1)
+  cfi_offset (lr, FRAME_LR_SAVE)
   std  r0,(SIGCONTEXT_GP_REGS+(PT_LNK*8))(r3)
   std  r0,(SIGCONTEXT_GP_REGS+(PT_NIP*8))(r3)
   stdu  r1,-128(r1)
+  cfi_adjust_cfa_offset (128)
   std  r4,(SIGCONTEXT_GP_REGS+(PT_R4*8))(r3)
   std  r5,(SIGCONTEXT_GP_REGS+(PT_R5*8))(r3)
   std  r6,(SIGCONTEXT_GP_REGS+(PT_R6*8))(r3)
@@ -744,7 +746,9 @@
   /* If the kernel is not at least 2.4.21 then generate a ENOSYS stub.  */
   mflr r0
   std  r0,FRAME_LR_SAVE(r1)
+  cfi_offset (lr, FRAME_LR_SAVE)
   stdu r1,-128(r1)
+  cfi_adjust_cfa_offset (128)
   li   r3,ENOSYS
   bl   JUMPTARGET(__syscall_error)
   nop

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