gcc 4.0 compiles kernel with altivec

Alan Modra amodra at bigpond.net.au
Thu Feb 17 14:27:07 EST 2005


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.

> 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..

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Linuxppc64-dev mailing list