Source-Changes-HG archive

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

[src/trunk]: src/external/gpl3/gcc/dist/gcc Switch eARM to using normal DWARF...



details:   https://anonhg.NetBSD.org/src/rev/25d9c39b30ea
branches:  trunk
changeset: 329615:25d9c39b30ea
user:      joerg <joerg%NetBSD.org@localhost>
date:      Fri May 30 18:31:31 2014 +0000

description:
Switch eARM to using normal DWARF exception handling.

diffstat:

 external/gpl3/gcc/dist/gcc/common/config/arm/arm-common.c |   3 ++
 external/gpl3/gcc/dist/gcc/config/arm/arm.h               |  21 ++++++++++++--
 external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h       |   9 ++++++
 3 files changed, 30 insertions(+), 3 deletions(-)

diffs (79 lines):

diff -r d94d2085f8cc -r 25d9c39b30ea external/gpl3/gcc/dist/gcc/common/config/arm/arm-common.c
--- a/external/gpl3/gcc/dist/gcc/common/config/arm/arm-common.c Fri May 30 18:30:32 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/common/config/arm/arm-common.c Fri May 30 18:31:31 2014 +0000
@@ -48,6 +48,9 @@
     return UI_SJLJ;
 #endif
 
+  if (ARM_DWARF_UNWIND_TABLES)
+    return UI_DWARF2;
+
   /* If not using ARM EABI unwind tables... */
   if (ARM_UNWIND_INFO)
     {
diff -r d94d2085f8cc -r 25d9c39b30ea external/gpl3/gcc/dist/gcc/config/arm/arm.h
--- a/external/gpl3/gcc/dist/gcc/config/arm/arm.h       Fri May 30 18:30:32 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/arm/arm.h       Fri May 30 18:31:31 2014 +0000
@@ -889,6 +889,11 @@
 #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 @@
 #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
diff -r d94d2085f8cc -r 25d9c39b30ea external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h
--- a/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h       Fri May 30 18:30:32 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h       Fri May 30 18:31:31 2014 +0000
@@ -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__");   \
     }                                          \



Home | Main Index | Thread Index | Old Index