From 267c09ab53236587a4f5c4412182885daab79fce Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Mon, 8 Sep 1997 08:53:21 +0000 Subject: dwarf2out.c (dwarf2out_frame_debug): Assume that in a PARALLEL prologue insn, only the first elt is significant. * dwarf2out.c (dwarf2out_frame_debug): Assume that in a PARALLEL prologue insn, only the first elt is significant. (output_call_frame_info): For exception handling, always use 4-byte fields as specified by the dwarf2 spec. Don't skip trivial FDEs. From-SVN: r15154 --- gcc/dwarf2out.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'gcc/dwarf2out.c') diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index ff682e4..fac5135 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -860,6 +860,10 @@ dwarf2out_frame_debug (insn) label = dwarf2out_cfi_label (); insn = PATTERN (insn); + /* Assume that in a PARALLEL prologue insn, only the first elt is + significant. Currently this is true. */ + if (GET_CODE (insn) == PARALLEL) + insn = XVECEXP (insn, 0, 0); assert (GET_CODE (insn) == SET); src = SET_SRC (insn); @@ -1239,7 +1243,10 @@ output_call_frame_info (for_eh) /* Output the CIE. */ ASM_GENERATE_INTERNAL_LABEL (l1, CIE_AFTER_SIZE_LABEL, for_eh); ASM_GENERATE_INTERNAL_LABEL (l2, CIE_END_LABEL, for_eh); - ASM_OUTPUT_DWARF_DELTA (asm_out_file, l2, l1); + if (for_eh) + ASM_OUTPUT_DWARF_DELTA4 (asm_out_file, l2, l1); + else + ASM_OUTPUT_DWARF_DELTA (asm_out_file, l2, l1); if (flag_verbose_asm) fprintf (asm_out_file, "\t%s Length of Common Information Entry", ASM_COMMENT_START); @@ -1252,7 +1259,7 @@ output_call_frame_info (for_eh) fprintf (asm_out_file, "\t%s CIE Identifier Tag", ASM_COMMENT_START); fputc ('\n', asm_out_file); - if (DWARF_OFFSET_SIZE == 8) + if (for_eh ? PTR_SIZE == 8 : DWARF_OFFSET_SIZE == 8) { ASM_OUTPUT_DWARF_DATA4 (asm_out_file, DW_CIE_ID); fputc ('\n', asm_out_file); @@ -1315,12 +1322,13 @@ output_call_frame_info (for_eh) for (i = 0; i < fde_table_in_use; ++i) { fde = &fde_table[i]; - if (fde->dw_fde_cfi == NULL) - continue; ASM_GENERATE_INTERNAL_LABEL (l1, FDE_AFTER_SIZE_LABEL, for_eh + i*2); ASM_GENERATE_INTERNAL_LABEL (l2, FDE_END_LABEL, for_eh + i*2); - ASM_OUTPUT_DWARF_DELTA (asm_out_file, l2, l1); + if (for_eh) + ASM_OUTPUT_DWARF_DELTA4 (asm_out_file, l2, l1); + else + ASM_OUTPUT_DWARF_DELTA (asm_out_file, l2, l1); if (flag_verbose_asm) fprintf (asm_out_file, "\t%s FDE Length", ASM_COMMENT_START); fputc ('\n', asm_out_file); @@ -1380,7 +1388,7 @@ output_call_frame_info (for_eh) if (for_eh) { /* Emit terminating zero for table. */ - ASM_OUTPUT_DWARF_DATA (asm_out_file, 0); + ASM_OUTPUT_DWARF_DATA4 (asm_out_file, 0); fputc ('\n', asm_out_file); } #endif -- cgit v1.1