This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Implicit altivec vs. linux kernel build
- From: Benjamin Herrenschmidt <benh at kernel dot crashing dot org>
- To: gcc at gcc dot gnu dot org
- Cc: Paul Mackerras <paulus at samba dot org>, Alan Modra <amodra at bigpond dot net dot au>
- Date: Mon, 28 Feb 2005 09:43:48 +1100
- Subject: Implicit altivec vs. linux kernel build
Hi !
There seem to be a problem with gcc 4.0 and implicit generation of
altivec instructions when -mcpu=970.
The problem is that the kernel cannot afford to use altivec instructions
(nor FPU) except in controlled environment. Specifically, things like
the RAID6 code has altivec (and SSE/2, which I think has a similar
problem) implementation which runs in the proper environment.
In order to build that, we have -mcpu=970. Unfortunately, with 4.0, that
causes gcc to implicitely generate altivec code, which breaks it all.
So what is the proper way or set of options for me to:
1) optionally have POWER4 optimisations (that must be independant on
the rest below)
2) be able to use altivec instructions in assembly
3) be able to use altivec in a few selected bits of C code
4) never have altivec code implicitely generated by the compiler
Regards,
Ben.