From: Steve Ellcey <sellcey@mips.com>
To: "Maciej W. Rozycki" <macro@codesourcery.com>
Cc: Richard Sandiford <rdsandiford@googlemail.com>,
<gcc-patches@gcc.gnu.org>
Subject: Re: [patch, mips] Size savings for MIPS16 switch statements
Date: Tue, 30 Jul 2013 16:56:00 -0000 [thread overview]
Message-ID: <1375203322.1690.192.camel@ubuntu-sellcey> (raw)
In-Reply-To: <alpine.DEB.1.10.1307300304260.32382@tp.orcam.me.uk>
On Tue, 2013-07-30 at 11:18 +0100, Maciej W. Rozycki wrote:
>
> -- it may be that the tests have to be disabled at -Os just like e.g.
> code-readable-1.c already is at -O0.
>
> Maciej
Sorry about that, not sure why I didn't notice the failures. Rather
then skipping the tests for -Os I was thinking it might be better to
increase the size of the switch statements. Here is a patch I have
tested to fix these failures.
Richard, does this look OK for checkin?
Steve Ellcey
sellcey@mips.com
2013-07-30 Steve Ellcey <sellcey@mips.com>
* gcc.target/mips/code-readable-1.c: Increase switch size.
* gcc.target/mips/code-readable-2.c: Ditto.
* gcc.target/mips/code-readable-3.c: Ditto.
* gcc.target/mips/code-readable-4.c: Ditto.
diff --git a/gcc/testsuite/gcc.target/mips/code-readable-1.c b/gcc/testsuite/gcc.target/mips/code-readable-1.c
index 34c2c0a..b3e864d 100644
--- a/gcc/testsuite/gcc.target/mips/code-readable-1.c
+++ b/gcc/testsuite/gcc.target/mips/code-readable-1.c
@@ -8,6 +8,10 @@ volatile int x4;
volatile int x5;
volatile int x6;
volatile int x7;
+volatile int x8;
+volatile int x9;
+volatile int x10;
+volatile int x11;
MIPS16 int
foo (int i, volatile *x)
@@ -21,6 +25,10 @@ foo (int i, volatile *x)
case 5: return x5 + x[4];
case 6: return x6 + x[5];
case 7: return x7 + x[6];
+ case 8: return x8 + x[7];
+ case 9: return x9 + x[8];
+ case 10: return x10 + x[9];
+ case 11: return x11 + x[10];
default: return 0;
}
}
diff --git a/gcc/testsuite/gcc.target/mips/code-readable-2.c b/gcc/testsuite/gcc.target/mips/code-readable-2.c
index 71aeb13..3d32504 100644
--- a/gcc/testsuite/gcc.target/mips/code-readable-2.c
+++ b/gcc/testsuite/gcc.target/mips/code-readable-2.c
@@ -7,6 +7,10 @@ volatile int x4;
volatile int x5;
volatile int x6;
volatile int x7;
+volatile int x8;
+volatile int x9;
+volatile int x10;
+volatile int x11;
MIPS16 int
foo (int i, volatile *x)
@@ -20,6 +24,10 @@ foo (int i, volatile *x)
case 5: return x5 + x[4];
case 6: return x6 + x[5];
case 7: return x7 + x[6];
+ case 8: return x8 + x[7];
+ case 9: return x9 + x[8];
+ case 10: return x10 + x[9];
+ case 11: return x11 + x[10];
default: return 0;
}
}
diff --git a/gcc/testsuite/gcc.target/mips/code-readable-3.c b/gcc/testsuite/gcc.target/mips/code-readable-3.c
index fc78505..aaf1874 100644
--- a/gcc/testsuite/gcc.target/mips/code-readable-3.c
+++ b/gcc/testsuite/gcc.target/mips/code-readable-3.c
@@ -7,6 +7,10 @@ volatile int x4;
volatile int x5;
volatile int x6;
volatile int x7;
+volatile int x8;
+volatile int x9;
+volatile int x10;
+volatile int x11;
MIPS16 int
foo (int i, volatile *x)
@@ -20,6 +24,10 @@ foo (int i, volatile *x)
case 5: return x5 + x[4];
case 6: return x6 + x[5];
case 7: return x7 + x[6];
+ case 8: return x8 + x[7];
+ case 9: return x9 + x[8];
+ case 10: return x10 + x[9];
+ case 11: return x11 + x[10];
default: return 0;
}
}
diff --git a/gcc/testsuite/gcc.target/mips/code-readable-4.c b/gcc/testsuite/gcc.target/mips/code-readable-4.c
index ae8ff8a..4db89f8 100644
--- a/gcc/testsuite/gcc.target/mips/code-readable-4.c
+++ b/gcc/testsuite/gcc.target/mips/code-readable-4.c
@@ -8,6 +8,10 @@ volatile int x4;
volatile int x5;
volatile int x6;
volatile int x7;
+volatile int x8;
+volatile int x9;
+volatile int x10;
+volatile int x11;
MIPS16 int
foo (int i, volatile *x)
@@ -21,6 +25,10 @@ foo (int i, volatile *x)
case 5: return x5 + x[4];
case 6: return x6 + x[5];
case 7: return x7 + x[6];
+ case 8: return x8 + x[7];
+ case 9: return x9 + x[8];
+ case 10: return x10 + x[9];
+ case 11: return x11 + x[10];
default: return 0;
}
}
next prev parent reply other threads:[~2013-07-30 16:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-23 17:56 Steve Ellcey
2013-07-23 19:48 ` Richard Sandiford
2013-07-30 11:41 ` Maciej W. Rozycki
2013-07-30 16:56 ` Steve Ellcey [this message]
2013-07-30 18:47 ` Maciej W. Rozycki
2013-07-30 19:36 ` Richard Sandiford
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=1375203322.1690.192.camel@ubuntu-sellcey \
--to=sellcey@mips.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=macro@codesourcery.com \
--cc=rdsandiford@googlemail.com \
/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).