Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/arch/arm only emit cfi if __ARM_EABI__ && __UNWIND_...



details:   https://anonhg.NetBSD.org/src/rev/9abbb2461b40
branches:  trunk
changeset: 789719:9abbb2461b40
user:      matt <matt%NetBSD.org@localhost>
date:      Wed Sep 04 21:17:15 2013 +0000

description:
only emit cfi if __ARM_EABI__ && __UNWIND_TABLES__

diffstat:

 lib/libc/arch/arm/gen/swapcontext.S |  12 ++++++++++--
 lib/libc/arch/arm/sys/cerror.S      |  12 ++++++------
 2 files changed, 16 insertions(+), 8 deletions(-)

diffs (102 lines):

diff -r cda7a1789107 -r 9abbb2461b40 lib/libc/arch/arm/gen/swapcontext.S
--- a/lib/libc/arch/arm/gen/swapcontext.S       Wed Sep 04 20:02:10 2013 +0000
+++ b/lib/libc/arch/arm/gen/swapcontext.S       Wed Sep 04 21:17:15 2013 +0000
@@ -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 @@
 #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 @@
        bl      PIC_SYM(_C_LABEL(setcontext), PLT)
        pop     {pc}
 #endif
+#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
        .cfi_endproc
        .fnend
+#endif
 END(swapcontext)
diff -r cda7a1789107 -r 9abbb2461b40 lib/libc/arch/arm/sys/cerror.S
--- a/lib/libc/arch/arm/sys/cerror.S    Wed Sep 04 20:02:10 2013 +0000
+++ b/lib/libc/arch/arm/sys/cerror.S    Wed Sep 04 21:17:15 2013 +0000
@@ -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 @@
 #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 @@
 #endif /* __thumb__ */
        mov     r1, r0
        RET
-#ifdef __ARM_EABI__
+#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
        .cfi_endproc
        .fnend
 #endif



Home | Main Index | Thread Index | Old Index