00db10
From 3a3acb6afc753475675b5724f206e619d0c9590d Mon Sep 17 00:00:00 2001
00db10
From: Tom Tromey <tromey@redhat.com>
00db10
Date: Mon, 20 Jan 2014 12:58:03 +0000
00db10
Subject: [PATCH] [AArch64] BZ #16169 Add CFI directives to clone.S
00db10
00db10
[BZ #16169] Add CFI directives to the AArch64 clone.S implementation
00db10
and ensure that the FP in the child is zero'd in order to comply with
00db10
AAPCS.
00db10
---
00db10
 NEWS                                          |    8 ++++----
00db10
 ports/ChangeLog.aarch64                       |    6 ++++++
00db10
 ports/sysdeps/unix/sysv/linux/aarch64/clone.S |    7 ++++++-
00db10
 3 files changed, 16 insertions(+), 5 deletions(-)
00db10
00db10
Index: glibc-2.17-c758a686/ports/sysdeps/unix/sysv/linux/aarch64/clone.S
00db10
===================================================================
00db10
--- glibc-2.17-c758a686/ports/sysdeps/unix/sysv/linux/aarch64/clone.S
00db10
+++ glibc-2.17-c758a686/ports/sysdeps/unix/sysv/linux/aarch64/clone.S
00db10
@@ -63,6 +63,7 @@ ENTRY(__clone)
00db10
 	mov	x8, #SYS_ify(clone)
00db10
 	/* X0:flags, x1:newsp, x2:parenttidptr, x3:newtls, x4:childtid.  */
00db10
 	svc	0x0
00db10
+	cfi_endproc
00db10
 	cmp	x0, #0
00db10
 	beq	2f
00db10
 	blt	C_SYMBOL_NAME(__syscall_error)
00db10
@@ -71,6 +72,9 @@ ENTRY(__clone)
00db10
 	b	syscall_error
00db10
 
00db10
 2:
00db10
+	cfi_startproc
00db10
+	cfi_undefined (x30)
00db10
+	mov	x29, 0
00db10
 #ifdef RESET_PID
00db10
 	tbnz	x5, #CLONE_THREAD_BIT, 3f
00db10
 	mov	x0, #-1
00db10
@@ -92,7 +96,8 @@ ENTRY(__clone)
00db10
 
00db10
 	/* We are done, pass the return value through x0.  */
00db10
 	b	HIDDEN_JUMPTARGET(_exit)
00db10
-
00db10
+	cfi_endproc
00db10
+	cfi_startproc
00db10
 PSEUDO_END (__clone)
00db10
 
00db10
 weak_alias (__clone, clone)