Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@oss.sgi.com>
To: Ian Chilton <mailinglist@ichilton.co.uk>
Cc: linux-mips@oss.sgi.com
Subject: Re: More GCC problems
Date: Fri, 3 Nov 2000 17:18:05 +0100	[thread overview]
Message-ID: <20001103171805.F24751@bacchus.dhis.org> (raw)
In-Reply-To: <20001103143725.A2123@woody.ichilton.co.uk>; from mailinglist@ichilton.co.uk on Fri, Nov 03, 2000 at 02:37:25PM +0000

On Fri, Nov 03, 2000 at 02:37:25PM +0000, Ian Chilton wrote:

> Hello,
> 
> > /tmp/cca08866.s: Assembler messages:
> > /tmp/cca08866.s:27593: Error: Branch out of range
> > /tmp/cca08866.s:27632: Error: Branch out of range
> > /tmp/cca08866.s:27637: Error: Branch out of range

This is a bug in all MIPS versions of gas I've ever examined, including the
vendors of GNU based development systems like Algorithmics.  The problem is
that gcc is producing code that results in loops of over 128kb size, so the
range of a normal branch is exceeded.  Gas should then convert assembler
code such as

loop:
	# > 128kb loop body
	bnez	reg, loop

into:

loop:
	# > 128kb loop body
	beq	reg, endloop
	jump	loop
endloop:

That's a non-trivial gas modification.

This is becoming an increasing problem with today's codesize.  Right now
only few applications are affected but Moore's law is mercyless ...

In this particular case I'll simply optimizing the code with -O1 or higher
will help by getting the loop body's size below 128kb size.  This may also
help with other affected packages.  It's however only a temporary solution;
we'll see code in the not to far future where the optimizer is no longer
able to get the code size below the critical size of 128kb.

  Ralf

  reply	other threads:[~2000-11-03 21:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-03 14:37 More GCC problems Ian Chilton
2000-11-03 16:18 ` Ralf Baechle [this message]
2000-11-03 18:07 ` Keith M Wesolowski
2000-11-03 18:27   ` Maciej W. Rozycki
2000-11-03 20:04   ` Ian Chilton
2000-11-03 21:41     ` Maciej W. Rozycki
  -- strict thread matches above, loose matches on Subject: below --
2000-11-03 10:21 Ian Chilton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20001103171805.F24751@bacchus.dhis.org \
    --to=ralf@oss.sgi.com \
    --cc=linux-mips@oss.sgi.com \
    --cc=mailinglist@ichilton.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox