This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH for EH on MIPS
- To: Jim Wilson <wilson at cygnus dot com>, Jason Merrill <jason at cygnus dot com>
- Subject: PATCH for EH on MIPS
- From: Mark Mitchell <mark at markmitchell dot com>
- Date: Fri, 30 Oct 1998 14:22:10 -0800
- Cc: egcs-patches at cygnus dot com
- Reply-to: mark at markmitchell dot com
Jim & Jason --
On sgi-mips-ultrix6.5 many eh tests fail when using `-mabi=64
-mips4'. The problem is that frame.c has:
struct dwarf_fde {
uword length;
sword CIE_delta;
void* pc_begin;
uaddr pc_range;
} __attribute__ ((packed, aligned (__alignof__ (void *))));
but the generated assembly looks like:
.4byte .LEFDE1-.LSFDE1 # FDE Length
.LSFDE1:
.8byte .LSFDE1-__FRAME_BEGIN__ # FDE CIE offset
That's no good; the CIE offset can only be a 4-byte quantity to match
frame.c. I suspect that this problem would show up on other 64-bit
ports as well.
This could be fixed either by using an 8-byte value in dwarf_fde, or
by generating a 4-byte offset. This patch does the latter.
Would one of you (Jim, in your dwarf2 capacity, or Jason, in your EH
capacity) care to comment?
--
Mark Mitchell mark@markmitchell.com
Mark Mitchell Consulting http://www.markmitchell.com
Fri Oct 30 12:46:25 1998 Mark Mitchell <mark@markmitchell.com>
* dwarf2out.c (output_call_frame_info): Use
ASM_OUTPUT_DWARF_DELTA4 for the CIE offset to match frame.c.
Index: dwarf2out.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/dwarf2out.c,v
retrieving revision 1.75
diff -c -p -r1.75 dwarf2out.c
*** dwarf2out.c 1998/10/28 22:30:54 1.75
--- dwarf2out.c 1998/10/30 20:43:55
*************** output_call_frame_info (for_eh)
*** 1830,1836 ****
ASM_OUTPUT_LABEL (asm_out_file, l1);
if (for_eh)
! ASM_OUTPUT_DWARF_DELTA (asm_out_file, l1, "__FRAME_BEGIN__");
else
ASM_OUTPUT_DWARF_OFFSET (asm_out_file, stripattributes (FRAME_SECTION));
if (flag_debug_asm)
--- 1830,1836 ----
ASM_OUTPUT_LABEL (asm_out_file, l1);
if (for_eh)
! ASM_OUTPUT_DWARF_DELTA4 (asm_out_file, l1, "__FRAME_BEGIN__");
else
ASM_OUTPUT_DWARF_OFFSET (asm_out_file, stripattributes (FRAME_SECTION));
if (flag_debug_asm)