Subject: RE: gcc assembler issues
To: None <port-pmax@netbsd.org>
From: Toru Nishimura <locore32@gaea.ocn.ne.jp>
List: port-pmax
Date: 06/29/2002 18:27:34
Collin Baillie <sanac@optushome.com.au> asked;

> /tmp/ccWjcZC2.s: Assembler messages:
> /tmp/ccWjcZC2.s:28764: Error: Branch out of range
>
> Ok, so I've compiled with the -S (instead of -c) option. And interpret.s
> works out the same. Line 28764 says this:
>
>   j       $L3655
> ...
> I wonder if a newer GCC has this issue fixed.

This is not a compiler bug in strict senses, but the program hits a limitation of
hardware.  J(ump) instruction takes 28bit target which happens not to cope
with the program.  The limitation does not matter for most cases as long as
functions are small enough.   Jumbo functions are very harmful for fast
compilation because optimizer spends much longer time to sweep around and
often results in poor register assignment for runtime.  Rather better to fix the
program side for public benefits.

Toru Nishimura