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