[PATCH, rs6000] Fix PR56010 and PR83743, -mcpu=native use wrong names

Peter Bergner bergner@vnet.ibm.com
Thu Jan 25 22:08:00 GMT 2018


On 1/25/18 2:18 PM, Segher Boessenkool wrote:
> Don't add this to rs6000-cpus.def; it belongs to the Linux support only.

Well, the reason I liked adding it to rs6000-cpus.def is that it keeps
the names together, so only one place to hold all of the info.  If you
prefer a separate table, then I can move it to driver-rs6000.c and it
would only need to hold info for AT_PLATFORMs that don't match GCC's
idea of the cpu name (eg, ppc440 versus 440).


> You also need to translate multiple AT_PLATFORM names for a single -mcpu=,
> not necessarily only two, so you probably want a separate translation table
> to do just the translation (in driver-rs6000.c ?)

Ah, I forgot about ppc440gp, even though it is in my list mentioned in the
link below.  I do think that is the only case though, "440", "ppc440" and
"ppc440gp" all being mapped to "440", but yes, that's not handled.


> Did you check this against the kernel's arch/powerpc/kernel/cputable.c ?

I did.  I posted my finding in the bugzilla:

    https://gcc.gnu.org/PR56010#c5

I'll note that I did not try and disambiguate 440 vs 440fp, etc. by looking
at the HWCAP for PPC_FEATURE_HAS_FPU, like I mentioned in the bugzilla entry
above.  That's due to just because the cpu supports HW FP, we cannot know
what ABI the distro that is running on the cpu is using.  I could very well
be using a soft-float ABI.  Thoughts on that?


Ok, I'll move the table to driver-rs6000.c and I'll resubmit.

Peter



More information about the Gcc-patches mailing list