This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR88346, Inconsistent list of CPUs supported by the rs6000 backend after r266502


Hi Alan,

Let's ask David?  (Cc:ed).  Strange that no one noticed powerpc64 before;
titan and rs64 aren't so strange though ;-)


Segher


On Fri, Dec 07, 2018 at 09:00:39PM +1030, Alan Modra wrote:
> This patch removes the %e error for AIX, since it seems there has been
> no attempt to keep ASM_CPU_SPEC cpu support up to date for AIX, and
> adds missing entries to ASM_CPU_SPEC in rs6000.h.  Removing the %e
> isn't ideal, but leaving it in and hitting a compiler error for -mcpu
> cases where the AIX assembler works fine with default options, is
> worse.
> 
> The rs64a->rs64 name change happened a long time ago as a fix for
> PR20813 (git commit c92b4c3f5b).
> 
> Bootstrapped and regression tested powerpc64le-linux.  OK?
> 
> 	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.
> 
> diff --git a/gcc/config/rs6000/aix71.h b/gcc/config/rs6000/aix71.h
> index 2398ed64baa..d2fbba4f509 100644
> --- a/gcc/config/rs6000/aix71.h
> +++ b/gcc/config/rs6000/aix71.h
> @@ -77,7 +77,7 @@ do {									\
>    mcpu=power4: -mpwr4; \
>    mcpu=power3: -m620; \
>    mcpu=powerpc: -mppc; \
> -  mcpu=rs64a: -mppc; \
> +  mcpu=rs64: -mppc; \
>    mcpu=603: -m603; \
>    mcpu=603e: -m603; \
>    mcpu=604: -m604; \
> @@ -88,8 +88,7 @@ do {									\
>    !mcpu*: %{mvsx: -mpwr6; \
>  	    maltivec: -m970; \
>  	    maix64|mpowerpc64: -mppc64; \
> -	    : %(asm_default)}; \
> -  :%eMissing -mcpu option in ASM_SPEC_CPU?\n} \
> +	    : %(asm_default)}} \
>  -many"
>  
>  #undef	ASM_DEFAULT_SPEC
> diff --git a/gcc/config/rs6000/aix72.h b/gcc/config/rs6000/aix72.h
> index cfb0258acce..211010748c6 100644
> --- a/gcc/config/rs6000/aix72.h
> +++ b/gcc/config/rs6000/aix72.h
> @@ -77,7 +77,7 @@ do {									\
>    mcpu=power4: -mpwr4; \
>    mcpu=power3: -m620; \
>    mcpu=powerpc: -mppc; \
> -  mcpu=rs64a: -mppc; \
> +  mcpu=rs64: -mppc; \
>    mcpu=603: -m603; \
>    mcpu=603e: -m603; \
>    mcpu=604: -m604; \
> @@ -88,8 +88,7 @@ do {									\
>    !mcpu*: %{mvsx: -mpwr6; \
>  	    maltivec: -m970; \
>  	    maix64|mpowerpc64: -mppc64; \
> -	    : %(asm_default)}; \
> -  :%eMissing -mcpu option in ASM_SPEC_CPU?\n} \
> +	    : %(asm_default)}} \
>  -many"
>  
>  #undef	ASM_DEFAULT_SPEC
> diff --git a/gcc/config/rs6000/driver-rs6000.c b/gcc/config/rs6000/driver-rs6000.c
> index 0a48d46d658..51c6b79e741 100644
> --- a/gcc/config/rs6000/driver-rs6000.c
> +++ b/gcc/config/rs6000/driver-rs6000.c
> @@ -449,7 +449,7 @@ static const struct asm_name asm_names[] = {
>    { "power8",	"-mpwr8" },
>    { "power9",	"-mpwr9" },
>    { "powerpc",	"-mppc" },
> -  { "rs64a",	"-mppc" },
> +  { "rs64",	"-mppc" },
>    { "603",	"-m603" },
>    { "603e",	"-m603" },
>    { "604",	"-m604" },
> @@ -477,8 +477,9 @@ static const struct asm_name asm_names[] = {
>    { "power9",	"-mpower9" },
>    { "a2",	"-ma2" },
>    { "powerpc",	"-mppc" },
> +  { "powerpc64", "-mppc64" },
>    { "powerpc64le", "%{mpower9-vector:-mpower9;:-mpower8}" },
> -  { "rs64a",	"-mppc64" },
> +  { "rs64",	"-mppc64" },
>    { "401",	"-mppc" },
>    { "403",	"-m403" },
>    { "405",	"-m405" },
> @@ -519,6 +520,7 @@ static const struct asm_name asm_names[] = {
>    { "e500mc64",	"-me500mc64" },
>    { "e5500",	"-me5500" },
>    { "e6500",	"-me6500" },
> +  { "titan",	"-mtitan" },
>    { NULL,	"\
>  %{mpower9-vector: -mpower9; \
>    mpower8-vector|mcrypto|mdirect-move|mhtm: -mpower8; \
> diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
> index 2a62679bdb8..e7e998d1492 100644
> --- a/gcc/config/rs6000/rs6000.h
> +++ b/gcc/config/rs6000/rs6000.h
> @@ -87,9 +87,10 @@
>    mcpu=power4: -mpower4; \
>    mcpu=power3: -mppc64; \
>    mcpu=powerpc: -mppc; \
> +  mcpu=powerpc64: -mppc64; \
>    mcpu=a2: -ma2; \
>    mcpu=cell: -mcell; \
> -  mcpu=rs64a: -mppc64; \
> +  mcpu=rs64: -mppc64; \
>    mcpu=401: -mppc; \
>    mcpu=403: -m403; \
>    mcpu=405: -m405; \
> @@ -130,11 +131,12 @@
>    mcpu=e500mc64: -me500mc64; \
>    mcpu=e5500: -me5500; \
>    mcpu=e6500: -me6500; \
> +  mcpu=titan: -mtitan; \
>    !mcpu*: %{mpower9-vector: -mpower9; \
>  	    mpower8-vector|mcrypto|mdirect-move|mhtm: -mpower8; \
>  	    mvsx: -mpower7; \
>  	    mpowerpc64: -mppc64;: %(asm_default)}; \
> -  :%eMissing -mcpu option in ASM_SPEC_CPU?\n} \
> +  :%eMissing -mcpu option in ASM_CPU_SPEC?\n} \
>  %{mvsx: -mvsx -maltivec; maltivec: -maltivec} \
>  -many"
>  
> 
> -- 
> Alan Modra
> Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]