440 ebony patch seems to have broken 85xx build on powerpc.git

Arnd Bergmann arnd at arndb.de
Fri May 25 07:16:29 EST 2007


On Thursday 24 May 2007, Josh Boyer wrote:
> 
> > I think it should really use -mcpu=powerpc on all files.
> > The problem that Dave saw was the result of using a compiler
> > that defaults to -mcpu=8540, which uses instruction that
> > don't work on 440.
> 
> You sure?  It griped about isel, and isel is implemented on all 440s
> with the exception of 440GP.  Yay for consistency.

strange indeed. -m440 does enable PPC_OPCODE_ISEL in the current
gas version, and probably all old ones as well.

> > The common files really need to be built with -mcpu flags that
> > make the code work on any system if you want to be able
> > to use just a single boot wrapper binary for all.
> 
> Yeah, it's finding those combinations that work for all the existing
> toolchains out there that's the issue.  That, or making the wrapper not
> compile all the platform files...  I don't know which makes more sense.

I've looked up the gas source and found two ways that allow us to
compile everywhere:

1. Pass -Wa,-many to gcc
This will really allow any possible instruction to be assembled, including
the old POWER architecture, but also includes all the other strange
stuff like -maltivec, -mspe, -me500, ...

2. protect the use of special instructions with .machine directives.
You can write all the inline assemblies like

	.machine push
	.machine 440
	<440 specific instruction>
	.machine pop

This should work in any reasonably recent version of binutils, meaning
that we don't need to pass stuff like -Wa,-m440 any more.

	Arnd <><



More information about the Linuxppc-dev mailing list