This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MIPS gas relaxation still doesn't work


On Sun, Oct 13, 2002 at 02:54:23PM -0700, H. J. Lu wrote:
> On Sat, Oct 12, 2002 at 11:34:23AM -0700, H. J. Lu wrote:
> > Hi Alexandre,
> > 
> > I don't think your MIPS gas relaxation works. I got
> > 
> > # mipsel-linux-gcc /export/gnu/src/gcc-3.2/gcc/gcc/testsuite/g++.dg/opt/longbranch1.C
> > /tmp/cc0rrnMz.s: Assembler messages:
> > /tmp/cc0rrnMz.s:33733: Error: Branch out of range
> > /tmp/cc0rrnMz.s:33740: Error: Branch out of range
> > 
> > Could you please verify it?
> > 
> 
> Here is a small testcase extracted from gcc. I got
> 
> # mipsel-linux-gcc -c foo.s 
> foo.s: Assembler messages:
> foo.s:7: Error: Branch out of range
> 
> You may say it is a gcc bug. But I don't remember to see SGI assmebler
> have any problem with g++.dg/opt/longbranch1.C. Does gcc generate
> different code for Irix from Linux? Is it really unsafe to do branch
> relaxation when macro is off.
> 
> 

Here is a testcase which gas refuses to relax. I have 2 questions:

1. Does the SGI mips assembler relax it?
2. Is noreorder/nomacro really needed for gas? If I remeber right, it
is safe for gas to use

foo:
	j foo

Can gcc be be modified not to generate noreorder/nomacro for branchs if
gas is used?


H.J.
--foo.s---
foo:
	.space	0x20000
	.set    noreorder
	.set    nomacro
	j	foo
	nop
	.set    macro
	.set    reorder


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]