Switch eARM to using normal DWARF exception handling.

This commit is contained in:
joerg 2014-05-30 18:31:31 +00:00
parent d4f1ac8b3b
commit 7632431698
3 changed files with 30 additions and 3 deletions

View File

@ -48,6 +48,9 @@ arm_except_unwind_info (struct gcc_options *opts)
return UI_SJLJ;
#endif
if (ARM_DWARF_UNWIND_TABLES)
return UI_DWARF2;
/* If not using ARM EABI unwind tables... */
if (ARM_UNWIND_INFO)
{

View File

@ -889,6 +889,11 @@ extern int arm_arch_thumb_hwdiv;
#define ARM_UNWIND_INFO 0
#endif
/* Overriden by config/arm/netbsd-eabi.h. */
#ifndef ARM_DWARF_UNWIND_TABLES
#define ARM_DWARF_UNWIND_TABLES 0
#endif
/* Use r0 and r1 to pass exception handling information. */
#define EH_RETURN_DATA_REGNO(N) (((N) < 2) ? N : INVALID_REGNUM)
@ -899,11 +904,21 @@ extern int arm_arch_thumb_hwdiv;
#ifndef ARM_TARGET2_DWARF_FORMAT
#define ARM_TARGET2_DWARF_FORMAT DW_EH_PE_pcrel
# if ARM_DWARF_UNWIND_TABLES
/* DWARF unwinding uses the normal indirect/pcrel vs absptr format
for 32bit platforms. */
# define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
((flag_pic \
&& ((GLOBAL) || (CODE))) \
? ((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4 \
: DW_EH_PE_absptr)
# else
/* ttype entries (the only interesting data references used)
use TARGET2 relocations. */
#define ASM_PREFERRED_EH_DATA_FORMAT(code, data) \
(((code) == 0 && (data) == 1 && ARM_UNWIND_INFO) ? ARM_TARGET2_DWARF_FORMAT \
: DW_EH_PE_absptr)
# define ASM_PREFERRED_EH_DATA_FORMAT(code, data) \
(((code) == 0 && (data) == 1 && ARM_UNWIND_INFO) ? ARM_TARGET2_DWARF_FORMAT \
: DW_EH_PE_absptr)
# endif
#endif
/* The native (Norcroft) Pascal compiler for the ARM passes the static chain

View File

@ -45,6 +45,13 @@
#undef ARM_DEFAULT_ABI
#define ARM_DEFAULT_ABI ARM_ABI_AAPCS_LINUX
#undef ARM_EABI_UNWIND_TABLES
#define ARM_EABI_UNWIND_TABLES 0
#undef ARM_UNWIND_INFO
#define ARM_UNWIND_INFO 0
#undef ARM_DWARF_UNWIND_TABLES
#define ARM_DWARF_UNWIND_TABLES 1
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
do \
@ -52,6 +59,8 @@
if (TARGET_AAPCS_BASED) \
TARGET_BPABI_CPP_BUILTINS(); \
NETBSD_OS_CPP_BUILTINS_ELF(); \
if (ARM_DWARF_UNWIND_TABLES) \
builtin_define ("__ARM_DWARF_EH__"); \
if (ARM_EABI_UNWIND_TABLES) \
builtin_define ("__UNWIND_TABLES__"); \
} \