===================================================================
@@ -958,10 +958,18 @@
{
int enc;
rtx ref;
- rtx personality = get_personality_function (current_function_decl);
fprintf (asm_out_file, "\t.cfi_startproc\n");
+ /* Do not emit cfi pseudos for exceptions if DWARF2 mechanism is not
used.
+ On most machine, cfi pseudos are also used for DWARF2 debug info, but
+ those for exceptions are supposed to be only used for DWARF2
+ mechanism. */
+ if (targetm_common.except_unwind_info (&global_options) != UI_DWARF2)
+ return;
+
+ rtx personality = get_personality_function (current_function_decl);
+
if (personality)
{