public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: Do not generate micromips code for the no-smartmips-lwxs.c testcase
@ 2015-07-06 13:34 Andrew Bennett
  2015-07-06 20:45 ` Moore, Catherine
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Bennett @ 2015-07-06 13:34 UTC (permalink / raw)
  To: gcc-patches
  Cc: Matthew Fortune, Moore, Catherine (Catherine_Moore@mentor.com)

Hi,

The LWXS instruction is part of the micromips ISA which means it is
valid to generate it for the no-smartmips-lwxs.c testcase.  I have
updated the dg-options for the test to ensure that it does not 
generate micromips code.

I have tested this on the mips-mti-elf target using 
mips32r2/{-mno-micromips/-mmicromips} test options and there are no new 
regressions.

The patch and ChangeLog are below.

Ok to commit?



Many thanks,


Andrew



testsuite/
	* gcc.target/mips/no-smartmips-lwxs.c: Add -mno-micromips to dg-options.


diff --git a/gcc/testsuite/gcc.target/mips/no-smartmips-lwxs.c b/gcc/testsuite/gcc.target/mips/no-smartmips-lwxs.c
index ecf856e..6701a1c 100644
--- a/gcc/testsuite/gcc.target/mips/no-smartmips-lwxs.c
+++ b/gcc/testsuite/gcc.target/mips/no-smartmips-lwxs.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-mno-smartmips" } */
+/* { dg-options "-mno-smartmips -mno-micromips" } */
 
 NOMIPS16 int scaled_indexed_word_load (int a[], int b)
 {


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] MIPS: Do not generate micromips code for the no-smartmips-lwxs.c testcase
  2015-07-06 13:34 [PATCH] MIPS: Do not generate micromips code for the no-smartmips-lwxs.c testcase Andrew Bennett
@ 2015-07-06 20:45 ` Moore, Catherine
  2015-07-07 16:08   ` Andrew Bennett
  0 siblings, 1 reply; 3+ messages in thread
From: Moore, Catherine @ 2015-07-06 20:45 UTC (permalink / raw)
  To: Andrew Bennett, gcc-patches; +Cc: Matthew Fortune



> -----Original Message-----
> From: Andrew Bennett [mailto:Andrew.Bennett@imgtec.com]
> Sent: Monday, July 06, 2015 9:34 AM
> To: gcc-patches@gcc.gnu.org
> Cc: Matthew Fortune; Moore, Catherine
> Subject: [PATCH] MIPS: Do not generate micromips code for the no-
> smartmips-lwxs.c testcase
> 
> Hi,
> 
> The LWXS instruction is part of the micromips ISA which means it is valid to
> generate it for the no-smartmips-lwxs.c testcase.  I have updated the dg-
> options for the test to ensure that it does not generate micromips code.
> 
> I have tested this on the mips-mti-elf target using mips32r2/{-mno-
> micromips/-mmicromips} test options and there are no new regressions.
> 
> The patch and ChangeLog are below.
> 
> Ok to commit?
> 
> 
> 
> Many thanks,
> 
> 
> Andrew
> 
> 
> 
> testsuite/
> 	* gcc.target/mips/no-smartmips-lwxs.c: Add -mno-micromips to dg-
> options.
> 
> 
> diff --git a/gcc/testsuite/gcc.target/mips/no-smartmips-lwxs.c
> b/gcc/testsuite/gcc.target/mips/no-smartmips-lwxs.c
> index ecf856e..6701a1c 100644
> --- a/gcc/testsuite/gcc.target/mips/no-smartmips-lwxs.c
> +++ b/gcc/testsuite/gcc.target/mips/no-smartmips-lwxs.c
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-mno-smartmips" } */
> +/* { dg-options "-mno-smartmips -mno-micromips" } */
> 
>  NOMIPS16 int scaled_indexed_word_load (int a[], int b)  {
> 

Hi Andrew,

Instead of adding the -mno-micromips option to dg-options, please change the MIPS16 attribute to NOCOMPRESSION.

Index: gcc.target/mips/no-smartmips-lwxs.c
===================================================================
--- gcc.target/mips/no-smartmips-lwxs.c (revision 452061)
+++ gcc.target/mips/no-smartmips-lwxs.c (working copy)
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-mno-smartmips" } */

-NOMIPS16 int scaled_indexed_word_load (int a[], int b)
+NOCOMPRESSION int scaled_indexed_word_load (int a[], int b)
 {
   return a[b];
 }

OK with that change.
Catherine

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] MIPS: Do not generate micromips code for the no-smartmips-lwxs.c testcase
  2015-07-06 20:45 ` Moore, Catherine
@ 2015-07-07 16:08   ` Andrew Bennett
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Bennett @ 2015-07-07 16:08 UTC (permalink / raw)
  To: Moore, Catherine, gcc-patches; +Cc: Matthew Fortune

> Hi Andrew,
> 
> Instead of adding the -mno-micromips option to dg-options, please change the
> MIPS16 attribute to NOCOMPRESSION.
> 
> Index: gcc.target/mips/no-smartmips-lwxs.c
> ===================================================================
> --- gcc.target/mips/no-smartmips-lwxs.c (revision 452061)
> +++ gcc.target/mips/no-smartmips-lwxs.c (working copy)
> @@ -1,7 +1,7 @@
>  /* { dg-do compile } */
>  /* { dg-options "-mno-smartmips" } */
> 
> -NOMIPS16 int scaled_indexed_word_load (int a[], int b)
> +NOCOMPRESSION int scaled_indexed_word_load (int a[], int b)
>  {
>    return a[b];
>  }
> 
> OK with that change.
> Catherine

Committed as SVN 225519. 

Regards,



Andrew

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-07 16:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-06 13:34 [PATCH] MIPS: Do not generate micromips code for the no-smartmips-lwxs.c testcase Andrew Bennett
2015-07-06 20:45 ` Moore, Catherine
2015-07-07 16:08   ` Andrew Bennett

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).