summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2008-03-16 00:58:57 +0000
committerPaul Brook <pbrook@gcc.gnu.org>2008-03-16 00:58:57 +0000
commit80efdb6af52e8d0c24ab70537cf81a6b0a17f95e (patch)
treeb5d4dd29fc14b449358799f47a76a45cbf01daf9
parent393ab2528439344bdad70371c8a1023474e087da (diff)
arm.c (arm_unwind_emit): Suppress unused unwinding annotations.
2008-03-15 Paul Brook <paul@codesourcery.com> gcc/ * config/arm/arm.c (arm_unwind_emit): Suppress unused unwinding annotations. (arm_output_fn_unwind): Mark functions that can not be unwound. From-SVN: r133266
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/arm/arm.c17
2 files changed, 22 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fcb1623cc30..bb89350e4d4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2008-03-15 Paul Brook <paul@codesourcery.com>
+ * config/arm/arm.c (arm_unwind_emit): Suppress unused unwinding
+ annotations.
+ (arm_output_fn_unwind): Mark functions that can not be unwound.
+
+2008-03-15 Paul Brook <paul@codesourcery.com>
+
* config/arm/arm.c (arm_rtx_costs_1): Add costs for ARMv6 value
extension instructions.
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 4fb0a0d1f1e..43a3078278d 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -18633,6 +18633,11 @@ arm_unwind_emit (FILE * asm_out_file, rtx insn)
if (!ARM_EABI_UNWIND_TABLES)
return;
+ if (!(flag_unwind_tables || cfun->uses_eh_lsda)
+ && (TREE_NOTHROW (current_function_decl)
+ || cfun->all_throwers_are_sibcalls))
+ return;
+
if (GET_CODE (insn) == NOTE || !RTX_FRAME_RELATED_P (insn))
return;
@@ -18713,7 +18718,17 @@ arm_output_fn_unwind (FILE * f, bool prologue)
if (prologue)
fputs ("\t.fnstart\n", f);
else
- fputs ("\t.fnend\n", f);
+ {
+ /* If this function will never be unwound, then mark it as such.
+ The came condition is used in arm_unwind_emit to suppress
+ the frame annotations. */
+ if (!(flag_unwind_tables || cfun->uses_eh_lsda)
+ && (TREE_NOTHROW (current_function_decl)
+ || cfun->all_throwers_are_sibcalls))
+ fputs("\t.cantunwind\n", f);
+
+ fputs ("\t.fnend\n", f);
+ }
}
static bool