Bug 88346 - [9 Regression] Inconsistent list of CPUs supported by the rs6000 backend after r266502
Summary: [9 Regression] Inconsistent list of CPUs supported by the rs6000 backend afte...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 9.0
: P1 normal
Target Milestone: 9.0
Assignee: Alan Modra
URL: https://gcc.gnu.org/ml/gcc-patches/20...
Keywords: patch
Depends on:
Blocks:
 
Reported: 2018-12-04 02:59 UTC by Arseny Solokha
Modified: 2018-12-23 13:30 UTC (History)
0 users

See Also:
Host:
Target: powerpc-*-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed: 2018-12-04 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arseny Solokha 2018-12-04 02:59:53 UTC
After r266502 gcc still lists powerpc64, rs64, and titan as valid arguments to -mcpu when emitting diagnostic for invalid -mcpu= argument:

% powerpc-e300c3-linux-gnu-gcc-9.0.0-alpha20181202 -mcpu=list
powerpc-e300c3-linux-gnu-gcc-9.0.0-alpha20181202: error: unrecognized argument in option '-mcpu=list'
powerpc-e300c3-linux-gnu-gcc-9.0.0-alpha20181202: note: valid arguments to '-mcpu=' are: 401 403 405 405fp 440 440fp 464 464fp 476 476fp 505 601 602 603 603e 604 604e 620 630 740 7400 7450 750 801 821 823 8540 8548 860 970 G3 G4 G5 a2 cell e300c2 e300c3 e500mc e500mc64 e5500 e6500 ec603e native power3 power4 power5 power5+ power6 power6x power7 power8 power9 powerpc powerpc64 powerpc64le rs64 titan
powerpc-e300c3-linux-gnu-gcc-9.0.0-alpha20181202: fatal error: no input files
compilation terminated.

However, when provided w/ -mcpu=powerpc64, =rs64, or =titan, it now fails w/ the following:

% powerpc-e300c3-linux-gnu-gcc-9.0.0-alpha20181202 -mcpu=powerpc64 -w -c test.c -o /dev/null
powerpc-e300c3-linux-gnu-gcc-9.0.0-alpha20181202: error: Missing -mcpu option in ASM_SPEC_CPU?

which actually agrees w/ what is defined for ASM_CPU_SPEC in config/rs6000/rs6000.h.

I also believe that ASM_SPEC_CPU in :%eMissing -mcpu option in ASM_SPEC_CPU?\n defined in config/rs6000/aix72.h, config/rs6000/aix71.h, and config/rs6000/rs6000.h should actually read ASM_CPU_SPEC.
Comment 1 Alan Modra 2018-12-04 07:01:24 UTC
OK, good, the %e is doing its job in showing up missing cases..  And thanks for pointing out the silly typo.
Comment 2 Alan Modra 2018-12-23 13:28:51 UTC
Author: amodra
Date: Sun Dec 23 13:28:20 2018
New Revision: 267375

URL: https://gcc.gnu.org/viewcvs?rev=267375&root=gcc&view=rev
Log:
[RS6000] PR88346, Inconsistent list of CPUs supported after r266502

This patch removes the %e error for AIX, since it seems there has been
no attempt to keep cpu support up to date for AIX, and adds missing
entries to ASM_CPU_SPEC in rs6000.h.  The rs64a->rs64 name change
happened a long time ago as a fix for PR20813 (git commit c92b4c3f5b).

	PR 88346
	* config/rs6000/rs6000.h (ASM_CPU_SPEC): Correct %e message.  Handle
	-mcpu=rs64, not -mcpu=rs64a.  Handle -mcpu=powerpc64 and -mcpu=titan.
	* config/rs6000/driver-rs6000.c (asm_names): Similarly.
	* config/rs6000/aix71.h (ASM_CPU_SPEC): Delete %e message.  Handle
	-mcpu=rs64, not -mcpu=rs64a.
	* config/rs6000/aix72.h (ASM_CPU_SPEC): Likewise.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/rs6000/aix71.h
    trunk/gcc/config/rs6000/aix72.h
    trunk/gcc/config/rs6000/driver-rs6000.c
    trunk/gcc/config/rs6000/rs6000.h
Comment 3 Alan Modra 2018-12-23 13:30:16 UTC
Fixed