gcc 4.0 compiles kernel with altivec

Benjamin Herrenschmidt benh at kernel.crashing.org
Thu Feb 17 14:33:14 EST 2005


On Thu, 2005-02-17 at 13:57 +1030, Alan Modra wrote:
> On Thu, Feb 17, 2005 at 09:31:28AM +1100, Benjamin Herrenschmidt wrote:
> > I think gcc should separate options for "allow altivec" and "implicitely
> > use altivec" ...
> 
> Well, it doesn't.  :-(  Perhaps use -mcpu=970 just for the file where
> you _want_ altivec.

Well, it's more a few functions than a file, but I agree we could
split... (we must make sure the "wrapper" function that enables/disables
the vector engine don't get generated with implicit vec instructions).

> > Also, Alan, when using Altivec implicitely, does it properly fill vrsave
> > with bits indicating which registers it uses and does it save & restore
> > it ?
> 
> Yes, that's part of our ABI.
> 
> > I can imagine userland apps causing a severe hit on context switch time
> > bcs they all start using altivec and cause the kernel to have to swap
> > 32x128bits registers... I've been thinking about using vrsave to break
> > the save/restore code into 2 or 4 parts and only save the ones that need
> > to be saved. (It's an ABI thing anyway)
> 
> Yes, you should definitely do this..

Yup, will probably do when I have some time, I need to bench the whole
stuff though.

Ben.





More information about the Linuxppc64-dev mailing list