aboutsummaryrefslogtreecommitdiff
path: root/gcc/final.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2018-03-07 15:54:59 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2018-03-07 15:54:59 +0000
commitb78b513e41b3d491efa0bd639cedbad8622a09bd (patch)
tree5043355c1914fa0a327adcad08751d898419f92f /gcc/final.c
parent123ba0918c9ba27eeba43c885854a553e2b8b6f7 (diff)
downloadgcc-b78b513e41b3d491efa0bd639cedbad8622a09bd.zip
gcc-b78b513e41b3d491efa0bd639cedbad8622a09bd.tar.gz
gcc-b78b513e41b3d491efa0bd639cedbad8622a09bd.tar.bz2
re PR target/84277 (A lot of new acats testsuite failures)
PR target/84277 * except.h (output_function_exception_table): Adjust prototype. * except.c (output_function_exception_table): Remove FNNAME parameter and add SECTION parameter. Ouput one part of the table at a time. * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output the first part of the exception table and emit unwind directives. * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare. (i386_pe_seh_cold_init): Likewise. * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro. (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise. * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment. (ix86_output_call_insn): Emit a nop in one more case for SEH. * config/i386/winnt.c: Include except.h. (struct seh_frame_state): Add reg_offset, after_prologue and in_cold_section fields. (i386_pe_seh_end_prologue): Set seh->after_prologue. (i386_pe_seh_cold_init): New function. (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal to seh->in_cold_section. (seh_emit_push): Record the offset of the push. (seh_emit_save): Record the offet of the save. (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS. Test seh->after_prologue to disregard the epilogue. (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini. (i386_pe_end_cold_function): New function. From-SVN: r258338
Diffstat (limited to 'gcc/final.c')
-rw-r--r--gcc/final.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/final.c b/gcc/final.c
index b3450a1..87a3067 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -2265,6 +2265,11 @@ final_scan_insn_1 (rtx_insn *insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED,
case NOTE_INSN_SWITCH_TEXT_SECTIONS:
maybe_output_next_view (seen);
+ output_function_exception_table (0);
+
+ if (targetm.asm_out.unwind_emit)
+ targetm.asm_out.unwind_emit (asm_out_file, insn);
+
in_cold_section_p = !in_cold_section_p;
if (in_cold_section_p)
@@ -4672,7 +4677,7 @@ rest_of_handle_final (void)
/* The IA-64 ".handlerdata" directive must be issued before the ".endp"
directive that closes the procedure descriptor. Similarly, for x64 SEH.
Otherwise it's not strictly necessary, but it doesn't hurt either. */
- output_function_exception_table (fnname);
+ output_function_exception_table (crtl->has_bb_partition ? 1 : 0);
assemble_end_function (current_function_decl, fnname);