This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Cleanups for the m68k backend
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: bernie at develer dot com, <gcc at gcc dot gnu dot org>
- Date: Tue, 8 Jul 2003 21:11:21 -0400 (EDT)
- Subject: Re: Cleanups for the m68k backend
On Tue, 8 Jul 2003, Richard Henderson wrote:
> On Tue, Jul 08, 2003 at 10:15:30AM -0400, Hans-Peter Nilsson wrote:
> > Changing prologue from text to rtl causes unnecessary .eh_frame
> > growth; unnecessary at least in absence of -fasynchronous-exceptions.
>
> That should no longer be true. Do you have a counterexample?
Yes, if it ok with one from
.ident "GCC: (GNU) 3.4 20030611 (experimental)"
because I've trouble building with the recent intl changes.
Consider the following random C++ code (I believe only
nonleafness is of interest):
extern void y(int);
void x (int a)
{
y (a+2);
y (a);
}
Target i686-pc-linux-gnu, compiled with -O2 -dA (not all output
shown here). Same code and FDE table regardless of
-f{no-}asynchronous-unwind-tables and -f{no-}non-call-exceptions
(why are those on by default? Only java and GNAT need them!):
.globl _Z1xi
.type _Z1xi, @function
_Z1xi:
.LFB3:
# basic block 0
pushl %ebp
.LCFI0:
movl %esp, %ebp
.LCFI1:
pushl %ebx
.LCFI2:
subl $4, %esp
.LCFI3:
movl 8(%ebp), %ebx
leal 2(%ebx), %eax
movl %eax, (%esp)
call _Z1yi
movl %ebx, 8(%ebp)
popl %eax
popl %ebx
popl %ebp
jmp _Z1yi
.LFE3:
Note the DW_CFA_advance_loc4:s pointing to several individual
prologue instructions in the FDE in .eh_frame. I believe only
one should be necessary. (You have better control over when
those labels are output using the dwarf2out_* machinery and a
text prologue. It seems the RTL EH-frame machinery could prune
those labels too without too much effort when allowed.)
.LSFDE1:
.long .LEFDE1-.LASFDE1 # FDE Length
.LASFDE1:
.long .LASFDE1-.Lframe1 # FDE CIE offset
.long .LFB3 # FDE initial location
.long .LFE3-.LFB3 # FDE address range
.byte 0x0 # uleb128 0x0; Augmentation size
.byte 0x4 # DW_CFA_advance_loc4
.long .LCFI0-.LFB3
.byte 0xe # DW_CFA_def_cfa_offset
.byte 0x8 # uleb128 0x8
.byte 0x85 # DW_CFA_offset, column 0x5
.byte 0x2 # uleb128 0x2
.byte 0x4 # DW_CFA_advance_loc4
.long .LCFI1-.LCFI0
.byte 0xd # DW_CFA_def_cfa_register
.byte 0x5 # uleb128 0x5
.byte 0x4 # DW_CFA_advance_loc4
.long .LCFI3-.LCFI1
.byte 0x83 # DW_CFA_offset, column 0x3
.byte 0x3 # uleb128 0x3
.align 4
.LEFDE1:
brgds, H-P