Use __ARM_EABI__ and new __UNWIND_TABLES__ to decide when to use .cfi ops

This commit is contained in:
matt 2013-09-05 05:15:47 +00:00
parent 8c08c8dda2
commit ca7975ae61
5 changed files with 19 additions and 19 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: divsi3.S,v 1.8 2013/08/22 19:25:00 matt Exp $ */
/* $NetBSD: divsi3.S,v 1.9 2013/09/05 05:16:08 matt Exp $ */
/*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
@ -29,19 +29,19 @@ ENTRY(__divsi3)
#elif !defined(__thumb__) || defined(_ARM_ARCH_T2)
b __divide
#else
#if defined(__ARM_EABI__) && (!defined(_KERNEL) && !defined(_STANDALONE))
#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
.fnstart
.cfi_startproc
#endif
push {r4, lr}
#if defined(__ARM_EABI__) && (!defined(_KERNEL) && !defined(_STANDALONE))
#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
.cfi_def_cfa_offset 8
.cfi_offset 14, -4
.cfi_offset 4, -8
#endif
bl __divide
pop {r4, pc}
#ifdef __ARM_EABI__
#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
.cfi_endproc
.fnend
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: udivsi3.S,v 1.4 2013/08/22 19:25:00 matt Exp $ */
/* $NetBSD: udivsi3.S,v 1.5 2013/09/05 05:16:08 matt Exp $ */
/*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
@ -29,12 +29,12 @@ ENTRY(__udivsi3)
#elif !defined(__thumb__) || defined(_ARM_ARCH_T2)
b __udivide
#else
#if defined(__ARM_EABI__) && (!defined(_KERNEL) && !defined(_STANDALONE))
#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
.fnstart
.cfi_startproc
#endif
push {r4, lr}
#if defined(__ARM_EABI__) && (!defined(_KERNEL) && !defined(_STANDALONE))
#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
.save {r4, lr}
.cfi_def_cfa_offset 8
.cfi_offset 14, -4
@ -42,7 +42,7 @@ ENTRY(__udivsi3)
#endif
bl __udivide
pop {r4, pc}
#ifdef __ARM_EABI__
#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
.cfi_endproc
.fnend
#endif

View File

@ -33,12 +33,12 @@
* Implementation of strcat using strlen/strcpy.
*/
ENTRY(strcat)
#if defined(__ARM_EABI__) && (!defined(_KERNEL) && !defined(_STANDALONE))
#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
.fnstart
.cfi_startproc
#endif
push {r3-r5, lr} /* save registers */
#if defined(__ARM_EABI__) && (!defined(_KERNEL) && !defined(_STANDALONE))
#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
.save {r3-r5, lr}
.cfi_def_cfa_offset 16
.cfi_offset 14, -4
@ -58,7 +58,7 @@ ENTRY(strcat)
mov r0, r4 /* restore dst as return value */
pop {r3-r5, pc} /* restore registers */
#if defined(__ARM_EABI__) && (!defined(_KERNEL) && !defined(_STANDALONE))
#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
.cfi_endproc
.fnend
#endif

View File

@ -29,16 +29,16 @@
#include <machine/asm.h>
RCSID("$NetBSD: strlcat_arm.S,v 1.4 2013/08/22 19:25:00 matt Exp $")
RCSID("$NetBSD: strlcat_arm.S,v 1.5 2013/09/05 05:15:47 matt Exp $")
/* LINTSTUB: size_t strlcat(char *, const char *, size_t) */
ENTRY(strlcat)
#if defined(__ARM_EABI__) && (!defined(_KERNEL) && !defined(_STANDALONE))
#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
.fnstart
.cfi_startproc
#endif
push {r4-r6, lr}
#if defined(__ARM_EABI__) && (!defined(_KERNEL) && !defined(_STANDALONE))
#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
.save {r4-r6, lr}
.cfi_def_cfa_offset 16
.cfi_offset 14, -4
@ -60,7 +60,7 @@ ENTRY(strlcat)
bl PLT_SYM(strlcpy) /* attempt to copy src */
adds r0, r0, r5 /* add remaining to strlcpy return */
pop {r4-r6, pc} /* restore registers and return */
#if defined(__ARM_EABI__) && (!defined(_KERNEL) && !defined(_STANDALONE))
#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
.cfi_endproc
.fnend
#endif

View File

@ -29,7 +29,7 @@
#include <machine/asm.h>
RCSID("$NetBSD: strlen_arm.S,v 1.7 2013/08/22 19:25:00 matt Exp $")
RCSID("$NetBSD: strlen_arm.S,v 1.8 2013/09/05 05:15:47 matt Exp $")
#if defined(__thumb__) && !defined(_ARM_ARCH_T2)
#error Only Thumb2 or ARM supported
@ -55,13 +55,13 @@ RCSID("$NetBSD: strlen_arm.S,v 1.7 2013/08/22 19:25:00 matt Exp $")
.text
ENTRY(FUNCNAME)
#if defined(__ARM_EABI__) && (!defined(_KERNEL) && !defined(_STANDALONE))
#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
.fnstart
.cfi_startproc
#endif
#ifdef STRNLEN
push {r4,r5} /* save some registers */
#if defined(__ARM_EABI__) && (!defined(_KERNEL) && !defined(_STANDALONE))
#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
.save {r4,r5}
.cfi_def_cfa_offset 8
.cfi_offset 5, -4
@ -173,7 +173,7 @@ ENTRY(FUNCNAME)
pop {r4, r5} /* restore registers */
RET /* return */
#endif
#if defined(__ARM_EABI__) && (!defined(_KERNEL) && !defined(_STANDALONE))
#if defined(__ARM_EABI__) && defined(__UNWIND_TABLES__)
.cfi_endproc
.fnend
#endif