aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2015-05-05 18:53:27 +0200
committerUros Bizjak <uros@gcc.gnu.org>2015-05-05 18:53:27 +0200
commit588823d27715ed5e8603b765820d7d60cb810072 (patch)
tree17aa8e3c2ce16fe9f550b6e397b6502635f063d9 /gcc
parentbd9e8f7e4a07c659959c4c5f2b874c2a292924a1 (diff)
downloadgcc-588823d27715ed5e8603b765820d7d60cb810072.zip
gcc-588823d27715ed5e8603b765820d7d60cb810072.tar.gz
gcc-588823d27715ed5e8603b765820d7d60cb810072.tar.bz2
re PR target/65990 (ICE: in extract_insn, at recog.c:2341 (unrecognizable insn) with -mmemcpy-strategy=rep_8byte:-1:noalign -m32 -mtune=btver2)
PR target/65990 * config/i386/i386.c (ix86_parse_stringop_strategy_string): Error out if rep_8byte stringop strategy was specified for 32-bit target. testsuite/ChangeLog: PR target/65990 * gcc.target/i386/pr65990.c: New test. From-SVN: r222817
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/i386/i386.c11
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/pr65990.c29
4 files changed, 51 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2fcfad9..0398a84 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2015-05-05 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/65990
+ * config/i386/i386.c (ix86_parse_stringop_strategy_string): Error out
+ if rep_8byte stringop strategy was specified for 32-bit target.
+
2015-05-05 Ilya Tocar <ilya.tocar@intel.com>
PR target/65915
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index eeef3d4..59db199 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -2988,6 +2988,17 @@ ix86_parse_stringop_strategy_string (char *strategy_str, bool is_memset)
return;
}
+ if ((stringop_alg) i == rep_prefix_8_byte
+ && !TARGET_64BIT)
+ {
+ /* rep; movq isn't available in 32-bit code. */
+ error ("stringop strategy name %s specified for option %s "
+ "not supported for 32-bit code",
+ alg_name,
+ is_memset ? "-mmemset_strategy=" : "-mmemcpy_strategy=");
+ return;
+ }
+
input_ranges[n].max = maxs;
input_ranges[n].alg = (stringop_alg) i;
if (!strcmp (align, "align"))
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index db07b66..bfa797b 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-05 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/65990
+ * gcc.target/i386/pr65990.c: New test.
+
2015-05-05 Ilya Tocar <ilya.tocar@intel.com>
PR target/65915
diff --git a/gcc/testsuite/gcc.target/i386/pr65990.c b/gcc/testsuite/gcc.target/i386/pr65990.c
new file mode 100644
index 0000000..c0e5bb6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr65990.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-mtune=btver2 -mmemcpy-strategy=rep_8byte:-1:noalign" }
+
+/* { dg-error "stringop strategy name rep_8byte specified for option -mmemcpy_strategy= not supported for 32-bit code" "" { target ia32 } 0 } */
+
+struct U9
+{
+ unsigned a[9];
+};
+
+struct U9 u9;
+
+void
+foo ()
+{
+ u9 = (struct U9) {
+ .a = {
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF
+ }
+ };
+}