On Feb 27, 2005, at 5:43 PM, Benjamin Herrenschmidt wrote:
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
Use -mcpu=970 -mno-altivec this will cause not altivec instructions to
be created. -mcpu=970 implies you are compiling for 970 and want the
best code produced.
-- Pinski