This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: MIPS gas relaxation still doesn't work
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Richard Sandiford <rsandifo at redhat dot com>
- Cc: aoliva at redhat dot com, linux-mips at linux-mips dot org, gcc at gcc dot gnu dot org,binutils at sources dot redhat dot com
- Date: Mon, 14 Oct 2002 09:16:49 -0700
- Subject: Re: MIPS gas relaxation still doesn't work
- References: <20021012113423.A27894@lucon.org> <20021013145423.A10174@lucon.org> <20021014082810.A28682@lucon.org> <wvnit05ovct.fsf@talisman.cambridge.redhat.com>
On Mon, Oct 14, 2002 at 05:09:38PM +0100, Richard Sandiford wrote:
> "H. J. Lu" <hjl@lucon.org> writes:
> > Can gcc be be modified not to generate noreorder/nomacro for branchs if
> > gas is used?
>
> Sounds like you're suggesting gcc should leave gas to fill delay slots?
>
Yes, when gcc doesn't know how.
> gcc is usually much better at filling delay slots than gas is. gas just
> looks at the previous instruction to see if it's suitable. gcc can pull
> pull instructions from the branch target instead.
>
I don't think so. Please check out g++.dg/opt/longbranch1.C. gcc 3.2
generates:
$L7488:
lw $2,52($fp)
.set noreorder
.set nomacro
bne $2,$0,$L7493
nop
j $L2
nop
.set macro
.set reorder
$L7493:
It is no better than gas and disables the branch relaxation. I don't
why gcc shouldn't let gas handle it in this case. That is gcc should
never fill the delay slot with nop.
H.J.