PATCH: Re: 971225: bootstrap fails onpowerpc-unknown-linux-gnu*

Franz Sirl Franz.Sirl-kernel@lauterbach.com
Sun Feb 1 15:35:00 GMT 1998


At 21:20 Uhr -0000 01.02.1998, Jeffrey A Law wrote:
>  In message <v03130302b0f6b969485c@[195.180.235.165]>you write:
>  > Hi,
>  >
>  > the reported bootstrap fail on Linux/PPC was introduced in rev. 1.3 of
>  > rs6000/sysv4.h by a #undef JUMP_TABLES_IN_TEXT_SECTION. linux.h includes
>  > sysv4.h but didn't override the change.
>  > Eventually this hides a bug in binutils?
>  >
>  > Bye,
>  > Franz.
>  >
>  >
>  > Tue Jan 29 22:44:00 1998 Franz Sirl <franz.sirl-kernel@lauterbach.com>
>  > 	* rs6000/linux.h: define JUMP_TABLES_IN_TEXT_SECTION
>Thanks.  I installed this patch.
>
>As Geoffrey noted, the real problem is how we handle switch tables
>in general.  I ran into the same group of problems when trying to
>change the PA port from using an indexed jump into jumps to case
>labels.  We had something like this:
>
>start of tablejump insn
>	blr
>	nop
>start of ADDR_VEC insn
>	jmp case1
>	nop
>	jmp case2
>	nop
>	jmp case3
>
>
>
>What I wanted to do was a more traditional scheme where either offsets
>or actual locations are kept as a table (it's the first step towards
>a much more branch prediction friendly tablejump on the PA).
>
>On the PA it is absolutely necessary to never mix data into a code
>section.  So these tables needed to go into readonly data...  And
>bang I ran into the same problems y'all are running into.
>
>I banged my head on the wall for about an hour or so trying to find
>an easy solution and just gave up when I realized that some fundamental
>changes in our switch/tablejump code would be necessary to make it
>work.

So this probably means it will take a while til this is really fixed
(Please avoid further headbanging, we all need you ;-)).
Probably Geoff's example should be converted to a test case.

All-in-all egcs (both 1.0.1 and current cvs) seems to be very stable on
powerpc-unknown-linux-gnu.

The problems remaining AFAIK:
- spill register problems
- switch statement (partially fixed by Geoff's unofficial patch)
- out-of-memory while compiling lynx-2-7-2 on my 40MB+128MBswap machine
(haven't investigated that further yet)
- the optimizer problems mentioned by Gary Thomas
- a problem with inlining (eg. glibc/linuxthreads/condvar.c)

Bye,
Franz.





More information about the Gcc mailing list