This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


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

Adding CFI statements to ARM's assembly code: vfork family


Hello!

On 2009-12-31 16:57, Joseph S. Myers wrote:
> sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S
> sysdeps/unix/sysv/linux/arm/nptl/vfork.S

No change was needed in sysdeps/unix/sysv/linux/arm/vfork.S.


2010-01-12  Thomas Schwinge  <thomas@codesourcery.com>

	* sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S (SAVE_PID): Add CFI
	statements.
	* sysdeps/unix/sysv/linux/arm/nptl/vfork.S (SAVE_PID): Likewise.

diff --git a/glibc-ports-mainline/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S b/glibc-ports-mainline/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S
index 1c2e1f5..964a389 100644
--- a/glibc-ports-mainline/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S
+++ b/glibc-ports-mainline/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2010 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
@@ -21,10 +21,14 @@
 /* Save the PID value.  */
 #define SAVE_PID \
 	str	lr, [sp, #-4]!;		/* Save LR.  */			\
+	cfi_adjust_cfa_offset (4);					\
+	cfi_rel_offset (lr, 0);						\
 	mov	r0, #0xffff0fff;	/* Point to the high page.  */	\
 	mov	lr, pc;			/* Save our return address.  */	\
 	sub	pc, r0, #31;		/* Jump to the TLS entry.  */	\
 	ldr	lr, [sp], #4;		/* Restore LR.  */		\
+	cfi_adjust_cfa_offset (-4);					\
+	cfi_restore (lr);						\
 	mov	r2, r0;			/* Save the TLS addr in r2.  */	\
 	ldr	r3, [r2, #PID_OFFSET];	/* Load the saved PID.  */	\
 	rsb	r0, r3, #0;		/* Negate it.  */		\
diff --git a/glibc-ports-mainline/sysdeps/unix/sysv/linux/arm/nptl/vfork.S b/glibc-ports-mainline/sysdeps/unix/sysv/linux/arm/nptl/vfork.S
index 87e055e..009d03a 100644
--- a/glibc-ports-mainline/sysdeps/unix/sysv/linux/arm/nptl/vfork.S
+++ b/glibc-ports-mainline/sysdeps/unix/sysv/linux/arm/nptl/vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2010 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
@@ -21,10 +21,14 @@
 /* Save the PID value.  */
 #define SAVE_PID \
 	str	lr, [sp, #-4]!;		/* Save LR.  */			\
+	cfi_adjust_cfa_offset (4);					\
+	cfi_rel_offset (lr, 0);						\
 	mov	r0, #0xffff0fff;	/* Point to the high page.  */	\
 	mov	lr, pc;			/* Save our return address.  */	\
 	sub	pc, r0, #31;		/* Jump to the TLS entry.  */	\
 	ldr	lr, [sp], #4;		/* Restore LR.  */		\
+	cfi_adjust_cfa_offset (-4);					\
+	cfi_restore (lr);						\
 	mov	r2, r0;			/* Save the TLS addr in r2.  */	\
 	ldr	r3, [r2, #PID_OFFSET];	/* Load the saved PID.  */	\
 	rsbs	r0, r3, #0;		/* Negate it.  */		\


I did not touch sysdeps/unix/sysv/linux/arm/linuxthreads/vfork.S.


Regards,
 Thomas

Attachment: pgp00000.pgp
Description: PGP signature


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