Hi!

On Sun, Dec 13, 2020 at 03:34:57PM +0100, Piotr Kubaj wrote:
> this is only default tuning (-mtune, not -mcpu).

It is both, actually (-mcpu= implies -mtune=)

> Linux also does similarly in linux64.h:
>      74 #undef  PROCESSOR_DEFAULT
>      75 #define PROCESSOR_DEFAULT PROCESSOR_POWER7
>      76 #undef  PROCESSOR_DEFAULT64
>      77 #define PROCESSOR_DEFAULT64 PROCESSOR_POWER8

Yes, but we still default to power4 on BE Linux (and power8 on LE).  I
get lost in the macro maze here, not sure how that works :-)

> Although there is hard to explain (for me) setting to tune for POWER7 on 
> 32-bits. POWER7 is 64-bit and it should be more reasonable to optimize for 
> the last 32-bit machines that still may be in use (so G4).

7450 has very different optimisation than 970.  Power7 and 970 have
largely similar pipelines.

> That said, on the 64-bit front, we will just match the Linux setting.

Compile a very simple test and look at the .machine in the generated .s?
Does that do what you want?


Segher

Reply via email to