Module Name:    src
Committed By:   matt
Date:           Wed Sep  4 21:17:15 UTC 2013

Modified Files:
        src/lib/libc/arch/arm/gen: swapcontext.S
        src/lib/libc/arch/arm/sys: cerror.S

Log Message:
only emit cfi if __ARM_EABI__ && __UNWIND_TABLES__


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/arm/gen/swapcontext.S
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/arm/sys/cerror.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/arch/arm/gen/swapcontext.S
diff -u src/lib/libc/arch/arm/gen/swapcontext.S:1.10 src/lib/libc/arch/arm/gen/swapcontext.S:1.11
--- src/lib/libc/arch/arm/gen/swapcontext.S:1.10	Tue Sep  3 00:30:19 2013
+++ src/lib/libc/arch/arm/gen/swapcontext.S	Wed Sep  4 21:17:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: swapcontext.S,v 1.10 2013/09/03 00:30:19 matt Exp $	*/
+/*	$NetBSD: swapcontext.S,v 1.11 2013/09/04 21:17:15 matt Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -33,19 +33,23 @@
 #include "assym.h"
 
 #if defined(LIBC_SCCS) && !defined(lint)
-        RCSID("$NetBSD: swapcontext.S,v 1.10 2013/09/03 00:30:19 matt Exp $")
+        RCSID("$NetBSD: swapcontext.S,v 1.11 2013/09/04 21:17:15 matt Exp $")
 #endif /* LIBC_SCCS && !lint */
 
 ENTRY(swapcontext)
+#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
 	.fnstart
 	.cfi_startproc
+#endif
 	push	{r0-r2, lr}	/* Must save oucp, ucp, lr. */
+#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
 	.save	{r0-r2, lr}
 	.cfi_def_cfa_offset 16
 	.cfi_offset 14, -4
 	.cfi_offset 2, -8
 	.cfi_offset 1, -12
 	.cfi_offset 0, -16
+#endif
 	bl	PIC_SYM(_C_LABEL(_getcontext), PLT)  /* getcontext(oucp) */
 	cmp	r0, #0
 #if !defined(__thumb__)
@@ -55,8 +59,10 @@ ENTRY(swapcontext)
 #else
 	pop	{r0-r3}
 	beq	1f
+#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
 	.cfi_def_cfa_offset 0
 	.cfi_register 14, 3
+#endif
 	RETr(r3)
 1:
 #endif
@@ -80,6 +86,8 @@ ENTRY(swapcontext)
 	bl	PIC_SYM(_C_LABEL(setcontext), PLT)
 	pop	{pc}
 #endif
+#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
 	.cfi_endproc
 	.fnend
+#endif
 END(swapcontext)

Index: src/lib/libc/arch/arm/sys/cerror.S
diff -u src/lib/libc/arch/arm/sys/cerror.S:1.10 src/lib/libc/arch/arm/sys/cerror.S:1.11
--- src/lib/libc/arch/arm/sys/cerror.S:1.10	Tue Sep  3 00:30:19 2013
+++ src/lib/libc/arch/arm/sys/cerror.S	Wed Sep  4 21:17:15 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cerror.S,v 1.10 2013/09/03 00:30:19 matt Exp $	*/
+/*	$NetBSD: cerror.S,v 1.11 2013/09/04 21:17:15 matt Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -35,12 +35,12 @@
 
 ENTRY_NP(CERROR)
 #ifdef _REENTRANT
-#ifdef __ARM_EABI__
+#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
 	.fnstart
 	.cfi_startproc
 #endif
 	push	{r4, lr}
-#ifdef __ARM_EABI__
+#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
 	.save	{r4, lr}
 	.cfi_def_cfa_offset 8
 	.cfi_offset 14, -4
@@ -57,12 +57,12 @@ ENTRY_NP(CERROR)
 #endif
 	mov	r1, r0
 	pop	{r4, pc}
-#ifdef __ARM_EABI__
+#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
 	.cfi_endproc
 	.fnend
 #endif
 #else /* !_REENTRANT */
-#ifdef __ARM_EABI__
+#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
 	.fnstart
 	.cfi_startproc
 #endif
@@ -84,7 +84,7 @@ ENTRY_NP(CERROR)
 #endif /* __thumb__ */
 	mov	r1, r0
 	RET
-#ifdef __ARM_EABI__
+#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
 	.cfi_endproc
 	.fnend
 #endif

Reply via email to