RE: Implicit altivec vs. linux kernel build

2005-02-28 Thread Benjamin Herrenschmidt
> Surely it would be possible to use -ffixed-* options to reserve all the > altivec registers and get precisely that effect? Nah, I don't need to be that drastic. The RAID6 code is already in a separate file that can have a specific additional set of compile flags, so I can just enable altivec

Re: Implicit altivec vs. linux kernel build

2005-02-28 Thread Geoffrey Keating
Benjamin Herrenschmidt <[EMAIL PROTECTED]> writes: > Unless -mcpu=POWER8 -mno-altivec -maltivec is legal ... Yes, a later -msomething will override a previous -mno-something.

RE: Implicit altivec vs. linux kernel build

2005-02-28 Thread Dave Korn
Original Message >From: gcc-owner On Behalf Of David Edelsohn >Sent: 27 February 2005 23:35 >> 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 ass

Re: Implicit altivec vs. linux kernel build

2005-02-27 Thread Benjamin Herrenschmidt
On Sun, 2005-02-27 at 19:32 -0500, David Edelsohn wrote: > > Benjamin Herrenschmidt writes: > > Ben> The only problem I see is that the day we have a CPU, let's call it > Ben> POWER8 for the sake of this demonstration, that has altivec and is > Ben> different enough to justify a specific "opti

Re: Implicit altivec vs. linux kernel build

2005-02-27 Thread David Edelsohn
> Benjamin Herrenschmidt writes: Ben> The only problem I see is that the day we have a CPU, let's call it Ben> POWER8 for the sake of this demonstration, that has altivec and is Ben> different enough to justify a specific "optimize" option, we'll have to Ben> use -mcpu=POWER8 -mno-altivec for

Re: Implicit altivec vs. linux kernel build

2005-02-27 Thread Benjamin Herrenschmidt
On Sun, 2005-02-27 at 18:56 -0500, David Edelsohn wrote: > > Benjamin Herrenschmidt writes: > > Ben> Ok. What I need is -mcpu=power4 -maltivec > > Sorry, no. -maltivec means generate Altivec code, not just enable > Altivec instructions and registers. The above option is not different

Re: Implicit altivec vs. linux kernel build

2005-02-27 Thread Andrew Pinski
On Feb 27, 2005, at 6:56 PM, David Edelsohn wrote: Benjamin Herrenschmidt writes: Ben> Ok. What I need is -mcpu=power4 -maltivec Sorry, no. -maltivec means generate Altivec code, not just enable Altivec instructions and registers. The above option is not different than -mcpu=970. There i

Re: Implicit altivec vs. linux kernel build

2005-02-27 Thread David Edelsohn
> Benjamin Herrenschmidt writes: Ben> Ok. What I need is -mcpu=power4 -maltivec Sorry, no. -maltivec means generate Altivec code, not just enable Altivec instructions and registers. The above option is not different than -mcpu=970. There is no DWIM option. David

Re: Implicit altivec vs. linux kernel build

2005-02-27 Thread Benjamin Herrenschmidt
On Sun, 2005-02-27 at 18:40 -0500, Andrew Pinski wrote: > On Feb 27, 2005, at 6:35 PM, David Edelsohn wrote: > > > As Andrew Pinski mentioned, you also can use -mcpu=970 > > -mno-altivec. That should allow the assembler to accept Altivec > > instructions, but GCC will not know about any Altiv

Re: Implicit altivec vs. linux kernel build

2005-02-27 Thread Alan Modra
On Mon, Feb 28, 2005 at 10:00:42AM +1100, Benjamin Herrenschmidt wrote: > Oh, and there are gcc version that will refuse -mcpu=power4 -maltivec so > I can't even use -mcpu=power4 for the whole kernel and -maltivec just > for the file containing the raid6 code I guess what you mean here it that the

Re: Implicit altivec vs. linux kernel build

2005-02-27 Thread Andrew Pinski
On Feb 27, 2005, at 6:35 PM, David Edelsohn wrote: As Andrew Pinski mentioned, you also can use -mcpu=970 -mno-altivec. That should allow the assembler to accept Altivec instructions, but GCC will not know about any Altivec registers for inlined assembly parameters. As I and Ben found out

Re: Implicit altivec vs. linux kernel build

2005-02-27 Thread David Edelsohn
> Oh, and there are gcc version that will refuse -mcpu=power4 -maltivec so > I can't even use -mcpu=power4 for the whole kernel and -maltivec just > for the file containing the raid6 code. As Andrew Pinski mentioned, you also can use -mcpu=970 -mno-altivec. That should allow the assembler

Re: Implicit altivec vs. linux kernel build

2005-02-27 Thread Benjamin Herrenschmidt
> Yes, but as I wrote, that prevents building the RAID6 code which > contains some selected altivec bits and cause gas to not get passed the > proper option so we can have instructions like "dssall" in the low level > assembly files. > > The later can probably be worked around by adding the prope

Re: Implicit altivec vs. linux kernel build

2005-02-27 Thread Benjamin Herrenschmidt
On Sun, 2005-02-27 at 17:53 -0500, David Edelsohn wrote: > > Benjamin Herrenschmidt writes: > > Ben> There seem to be a problem with gcc 4.0 and implicit generation of > Ben> altivec instructions when -mcpu=970. > > Ben> The problem is that the kernel cannot afford to use altivec instructions

Re: Implicit altivec vs. linux kernel build

2005-02-27 Thread David Edelsohn
> Benjamin Herrenschmidt writes: Ben> There seem to be a problem with gcc 4.0 and implicit generation of Ben> altivec instructions when -mcpu=970. Ben> The problem is that the kernel cannot afford to use altivec instructions Ben> (nor FPU) except in controlled environment. Specifically, thing

Re: Implicit altivec vs. linux kernel build

2005-02-27 Thread Benjamin Herrenschmidt
On Sun, 2005-02-27 at 17:47 -0500, Andrew Pinski wrote: > s 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 s

Re: Implicit altivec vs. linux kernel build

2005-02-27 Thread Andrew Pinski
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,

Implicit altivec vs. linux kernel build

2005-02-27 Thread Benjamin Herrenschmidt
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