gcc 4.0 compiles kernel with altivec

Benjamin Herrenschmidt benh at kernel.crashing.org
Thu Feb 17 09:31:28 EST 2005


On Thu, 2005-02-17 at 09:27 +1100, Anton Blanchard wrote:
>  > What are those macros ?
> 
> Like the stuff we are using in arch/ppc64/kernel/head.S:
> 
> .machine        push
> .machine        "power4"
>         mtcrf   0x80,r9
>         mtcrf   0x01,r9         /* slb_allocate uses cr0 and cr7 */
> .machine        pop

But that forces us to use assembly instead of C code for those
routines...

I think gcc should separate options for "allow altivec" and "implicitely
use 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 ?

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)

Ben.





More information about the Linuxppc64-dev mailing list