Module Name:    src
Committed By:   joerg
Date:           Fri May 30 18:31:31 UTC 2014

Modified Files:
        src/external/gpl3/gcc/dist/gcc/common/config/arm: arm-common.c
        src/external/gpl3/gcc/dist/gcc/config/arm: arm.h netbsd-eabi.h

Log Message:
Switch eARM to using normal DWARF exception handling.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
    src/external/gpl3/gcc/dist/gcc/common/config/arm/arm-common.c
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gcc/dist/gcc/config/arm/arm.h
cvs rdiff -u -r1.12 -r1.13 \
    src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h

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

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/common/config/arm/arm-common.c
diff -u src/external/gpl3/gcc/dist/gcc/common/config/arm/arm-common.c:1.1.1.1 src/external/gpl3/gcc/dist/gcc/common/config/arm/arm-common.c:1.2
--- src/external/gpl3/gcc/dist/gcc/common/config/arm/arm-common.c:1.1.1.1	Sat Mar  1 08:43:12 2014
+++ src/external/gpl3/gcc/dist/gcc/common/config/arm/arm-common.c	Fri May 30 18:31:31 2014
@@ -48,6 +48,9 @@ arm_except_unwind_info (struct gcc_optio
     return UI_SJLJ;
 #endif
 
+  if (ARM_DWARF_UNWIND_TABLES)
+    return UI_DWARF2;
+
   /* If not using ARM EABI unwind tables... */
   if (ARM_UNWIND_INFO)
     {

Index: src/external/gpl3/gcc/dist/gcc/config/arm/arm.h
diff -u src/external/gpl3/gcc/dist/gcc/config/arm/arm.h:1.8 src/external/gpl3/gcc/dist/gcc/config/arm/arm.h:1.9
--- src/external/gpl3/gcc/dist/gcc/config/arm/arm.h:1.8	Tue May 27 09:18:54 2014
+++ src/external/gpl3/gcc/dist/gcc/config/arm/arm.h	Fri May 30 18:31:31 2014
@@ -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

Index: src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h
diff -u src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h:1.12 src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h:1.13
--- src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h:1.12	Sat Mar  1 09:44:50 2014
+++ src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h	Fri May 30 18:31:31 2014
@@ -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__");	\
     }						\

Reply via email to