public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Michael Matz <matz@suse.de>
To: Alan Modra <amodra@gmail.com>
Cc: gcc-patches@gcc.gnu.org, Segher Boessenkool <segher@kernel.crashing.org>
Subject: Re: [RS6000] Don't pass -many to the assembler
Date: Mon, 12 Nov 2018 14:39:00 -0000	[thread overview]
Message-ID: <alpine.LSU.2.21.1811121436490.21712@wotan.suse.de> (raw)
In-Reply-To: <20181112114904.GH22752@bubble.grove.modra.org>

Hi,

On Mon, 12 Nov 2018, Alan Modra wrote:

> I'd like to remove -many from the options passed by default to the 
> assembler, on the grounds that a gcc bug in instruction selection (eg. 
> emitting a power9 insn for -mcpu=power8) is better found at assembly 
> time than run time.
> 
> This might annoy people for a while fixing user asm that we didn't 
> diagnose previously, but I believe this is the right direction to go. Of 
> course, -Wa,-many is available for anyone who just wants their dodgy old 
> code to work.

Wouldn't this also break compiling code that contains power9 instructions 
but guarded by runtime tests to only be executed on power9 machines?  That 
seems a valid usecase, and it'd be bad if the assembler fails to compile 
such.  (You can't use -mcpu=power9 as work around as the other 
unguarded code is not supposed to be using power9 insns).


Ciao,
Michael.

> 
> Bootstrapped etc. powerpc64le-linux.  OK?
> 
> 	* config/rs6000/rs6000.h (ASM_CPU_SPEC): Remove -many.
> 	* config/rs6000/aix61.h (ASM_CPU_SPEC): Likewise.
> 	* config/rs6000/aix71.h (ASM_CPU_SPEC): Likewise.
> 	* testsuite/gcc.target/powerpc/ppc32-abi-dfp-1.c: Don't use
> 	power mnemonics.
> 
> diff --git a/gcc/config/rs6000/aix61.h b/gcc/config/rs6000/aix61.h
> index 353e5d6cfeb..a7a8246bfe3 100644
> --- a/gcc/config/rs6000/aix61.h
> +++ b/gcc/config/rs6000/aix61.h
> @@ -91,8 +91,7 @@ do {									\
>  %{mcpu=630: -m620} \
>  %{mcpu=970: -m970} \
>  %{mcpu=G5: -m970} \
> -%{mvsx: %{!mcpu*: -mpwr6}} \
> --many"
> +%{mvsx: %{!mcpu*: -mpwr6}}"
>  
>  #undef	ASM_DEFAULT_SPEC
>  #define ASM_DEFAULT_SPEC "-mpwr4"
> diff --git a/gcc/config/rs6000/aix71.h b/gcc/config/rs6000/aix71.h
> index 2398ed64baa..d2ca8dc275d 100644
> --- a/gcc/config/rs6000/aix71.h
> +++ b/gcc/config/rs6000/aix71.h
> @@ -89,8 +89,7 @@ do {									\
>  	    maltivec: -m970; \
>  	    maix64|mpowerpc64: -mppc64; \
>  	    : %(asm_default)}; \
> -  :%eMissing -mcpu option in ASM_SPEC_CPU?\n} \
> --many"
> +  :%eMissing -mcpu option in ASM_SPEC_CPU?\n}"
>  
>  #undef	ASM_DEFAULT_SPEC
>  #define ASM_DEFAULT_SPEC "-mpwr4"
> diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
> index d75137cf8f5..9d78173a680 100644
> --- a/gcc/config/rs6000/rs6000.h
> +++ b/gcc/config/rs6000/rs6000.h
> @@ -137,8 +137,7 @@
>  	    mvsx: -mpower7; \
>  	    mpowerpc64: -mppc64;: %(asm_default)}; \
>    :%eMissing -mcpu option in ASM_SPEC_CPU?\n} \
> -%{mvsx: -mvsx -maltivec; maltivec: -maltivec} \
> --many"
> +%{mvsx: -mvsx -maltivec; maltivec: -maltivec}"
>  
>  #define CPP_DEFAULT_SPEC ""
>  
> diff --git a/gcc/testsuite/gcc.target/powerpc/ppc32-abi-dfp-1.c b/gcc/testsuite/gcc.target/powerpc/ppc32-abi-dfp-1.c
> index 14908dba690..eea7f6ffc2e 100644
> --- a/gcc/testsuite/gcc.target/powerpc/ppc32-abi-dfp-1.c
> +++ b/gcc/testsuite/gcc.target/powerpc/ppc32-abi-dfp-1.c
> @@ -45,14 +45,14 @@ __asm__ ("\t.globl\t" #NAME "_asm\n\t"					\
>  	 #NAME "_asm:\n\t"						\
>  	 "lis 11,gparms@ha\n\t"						\
>  	 "la 11,gparms@l(11)\n\t"					\
> -	 "st 3,0(11)\n\t"						\
> -	 "st 4,4(11)\n\t"						\
> -	 "st 5,8(11)\n\t"						\
> -	 "st 6,12(11)\n\t"						\
> -	 "st 7,16(11)\n\t"						\
> -	 "st 8,20(11)\n\t"						\
> -	 "st 9,24(11)\n\t"						\
> -	 "st 10,28(11)\n\t"						\
> +	 "stw 3,0(11)\n\t"						\
> +	 "stw 4,4(11)\n\t"						\
> +	 "stw 5,8(11)\n\t"						\
> +	 "stw 6,12(11)\n\t"						\
> +	 "stw 7,16(11)\n\t"						\
> +	 "stw 8,20(11)\n\t"						\
> +	 "stw 9,24(11)\n\t"						\
> +	 "stw 10,28(11)\n\t"						\
>  	 "stfd 1,32(11)\n\t"						\
>  	 "stfd 2,40(11)\n\t"						\
>  	 "stfd 3,48(11)\n\t"						\
> 
> 

  parent reply	other threads:[~2018-11-12 14:39 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12 11:49 Alan Modra
2018-11-12 13:28 ` Alan Modra
2018-11-12 14:39 ` Michael Matz [this message]
2018-11-12 14:52   ` Andreas Schwab
2018-11-12 15:43     ` Segher Boessenkool
2018-11-12 16:17       ` Michael Matz
2018-11-12 23:13         ` Alan Modra
2018-11-13  0:34           ` Mike Stump
2018-11-13  0:41             ` Iain Sandoe
2018-11-13  1:33             ` Alan Modra
2018-11-13 11:39               ` Segher Boessenkool
2018-11-13 17:49                 ` Peter Bergner
2018-11-13 18:07                   ` Iain Sandoe
2018-11-13 18:39                     ` Peter Bergner
2018-11-26 23:03                       ` Mike Stump
2018-11-14  3:14                 ` Alan Modra
2018-12-13 10:26                   ` Alan Modra
2018-12-13 15:02                     ` David Edelsohn
2018-11-12 17:51 ` Peter Bergner
2019-05-21 12:52 Alan Modra
2019-05-21 14:48 ` Segher Boessenkool
2019-05-22  3:26   ` Alan Modra
2019-05-22 20:29     ` Segher Boessenkool
2020-04-06 20:35 ` Sebastian Huber
2020-04-06 22:32   ` Segher Boessenkool

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LSU.2.21.1811121436490.21712@wotan.suse.de \
    --to=matz@suse.de \
    --cc=amodra@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=segher@kernel.crashing.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).