Jakub commented here that
https://gcc.gnu.org/ml/gcc-patches/2018-02/msg01325.html we don't turn
on fasynchronous-unwind-tables for AArch64. I note that x86_64 turns on
funwind-tables as well. Thus this patch turns on both.

Note that this doesn't increase code size but will likely increase
binary size because we now have a lot more eh_frame / debug_frame
information being spat out. We probably need to do get the clang /llvm
guys to do the same but I'll prod them separately.

Bootstrapped and regression tested on aarch64-none-linux-gnu.

Ok ?

regards
Ramana


config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES

common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
Turn on fasynchronous-unwind-tables and funwind-tables.
commit ef1b5fa855a369b9996ccd7041255ff75a4b5b63
Author: Ramana Radhakrishnan <ramana.radhakrish...@arm.com>
Date:   Mon Mar 5 17:13:58 2018 +0000

    Add unwind tables by default for AArch64
    
    asynctables

diff --git a/gcc/common/config/aarch64/aarch64-common.c 
b/gcc/common/config/aarch64/aarch64-common.c
index 7fd9305..a9fc5f1 100644
--- a/gcc/common/config/aarch64/aarch64-common.c
+++ b/gcc/common/config/aarch64/aarch64-common.c
@@ -53,6 +53,10 @@ static const struct default_options 
aarch_option_optimization_table[] =
     { OPT_LEVELS_1_PLUS, OPT_fsched_pressure, NULL, 1 },
     /* Enable redundant extension instructions removal at -O2 and higher.  */
     { OPT_LEVELS_2_PLUS, OPT_free, NULL, 1 },
+#if (TARGET_DEFAULT_ASYNC_UNWIND_TABLES == 1)
+    { OPT_LEVELS_ALL, OPT_fasynchronous_unwind_tables, NULL, 1 },
+    { OPT_LEVELS_ALL, OPT_funwind_tables, NULL, 1},
+#endif
     { OPT_LEVELS_NONE, 0, NULL, 0 }
   };
 
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 2156c6b..3fe7c8f 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -981,6 +981,7 @@ aarch64*-*-linux*)
        tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
        tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-linux.h"
        tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-linux"
+       tm_defines="${tm_defines}  TARGET_DEFAULT_ASYNC_UNWIND_TABLES=1"
        case $target in
        aarch64_be-*)
                tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"

Reply via email to