rs6000: Don't pass -many to the assembler [PR112868]

Message ID 8d093aa8-2ae5-4e40-a794-0b2fa9b1534f@linux.ibm.com
State New
Headers
Series rs6000: Don't pass -many to the assembler [PR112868] |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gcc_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 success Testing passed

Commit Message

jeevitha May 21, 2024, 1:27 p.m. UTC
  Hi All,

The following patch has been bootstrapped and regtested with default configuration
[--enable-checking=yes] and with --enable-checking=release on powerpc64le-linux.

This patch removes passing the -many assembler option for release builds. Now,
GCC no longer passes -many under any conditions to the assembler.

2024-05-15  Jeevitha Palanisamy  <jeevitha@linux.ibm.com>

gcc/
	PR target/112868
	* config/rs6000/rs6000.h (ASM_OPT_ANY): Removed Define.
	(ASM_CPU_SPEC): Remove ASM_OPT_ANY usage.
  

Comments

Peter Bergner May 22, 2024, 2:29 p.m. UTC | #1
On 5/21/24 8:27 AM, jeevitha wrote:
> The following patch has been bootstrapped and regtested with default configuration
> [--enable-checking=yes] and with --enable-checking=release on powerpc64le-linux.
> 
> This patch removes passing the -many assembler option for release builds. Now,
> GCC no longer passes -many under any conditions to the assembler.
> 
> 2024-05-15  Jeevitha Palanisamy  <jeevitha@linux.ibm.com>
> 
> gcc/
> 	PR target/112868
> 	* config/rs6000/rs6000.h (ASM_OPT_ANY): Removed Define.
> 	(ASM_CPU_SPEC): Remove ASM_OPT_ANY usage.

You are missing a ChangeLog entry for the target-supports.exp change plus
there is no mention of why it's needed in the git log entry.

Otherwise, the rest LGTM.

Peter
  
Segher Boessenkool May 22, 2024, 2:50 p.m. UTC | #2
Hi!

On Wed, May 22, 2024 at 09:29:13AM -0500, Peter Bergner wrote:
> On 5/21/24 8:27 AM, jeevitha wrote:
> > The following patch has been bootstrapped and regtested with default configuration
> > [--enable-checking=yes] and with --enable-checking=release on powerpc64le-linux.
> > 
> > This patch removes passing the -many assembler option for release builds. Now,
> > GCC no longer passes -many under any conditions to the assembler.

Why do we want that?  I cannot read minds.

> You are missing a ChangeLog entry for the target-supports.exp change plus
> there is no mention of why it's needed in the git log entry.

In the commit message you mean?  Yeah.  This info belongs in the commit
message.

Is the target-supports thing that Cell thing?  That does not belong here
at all.  If it wasn't simply a mistake, it should be a separate commit,
with a lot of explanation.


Segher
  

Patch

diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index 2cde2e329b0..1ccaee9d74c 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -94,12 +94,6 @@ 
   "%{mdejagnu-*: %<mdejagnu-*}", \
    SUBTARGET_DRIVER_SELF_SPECS
 
-#if CHECKING_P
-#define ASM_OPT_ANY ""
-#else
-#define ASM_OPT_ANY " -many"
-#endif
-
 /* Common ASM definitions used by ASM_SPEC among the various targets for
    handling -mcpu=xxx switches.  There is a parallel list in driver-rs6000.cc to
    provide the default assembler options if the user uses -mcpu=native, so if
@@ -166,8 +160,7 @@ 
 	    mvsx: -mpower7; \
 	    mpowerpc64: -mppc64;: %(asm_default)}; \
   :%eMissing -mcpu option in ASM_CPU_SPEC?\n} \
-%{mvsx: -mvsx -maltivec; maltivec: -maltivec}" \
-ASM_OPT_ANY
+%{mvsx: -mvsx -maltivec; maltivec: -maltivec}"
 
 #define CPP_DEFAULT_SPEC ""

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 4138cc9a662..7cc5d77a5be 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -7285,7 +7285,7 @@  proc check_effective_target_powerpc_ppu_ok { } {
 #endif
 		return 0;
 	    }
-	}]
+	} "-mcpu=cell"]
     } else {
 	return 0
     }