https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65990

--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> ---
Proposed patch:

--cut here--
Index: i386.c
===================================================================
--- i386.c      (revision 222796)
+++ i386.c      (working copy)
@@ -2988,6 +2988,17 @@ ix86_parse_stringop_strategy_string (char *strateg
           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"))
--cut here--

Reply via email to