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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-01-24
     Ever confirmed|0                           |1

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
This works on the testcase:

diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 9c1bfabe9a7..c24e70d9725 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -41,8 +41,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If
not, see

 #define TARGET_64BIT   TARGET_ISA_64BIT
 #define TARGET_64BIT_P(x) TARGET_ISA_64BIT_P(x)
-#define TARGET_MMX  TARGET_ISA_MMX
-#define TARGET_MMX_P(x)   TARGET_ISA_MMX_P(x)
+/* In 64-bit mode, use SSE2 to emulate MMX.  */
+#define TARGET_MMX  (TARGET_ISA_MMX || (TARGET_64BIT && TARGET_SSE2))
+#define TARGET_MMX_P(x)   (TARGET_ISA_MMX_P(x) \
+         || (TARGET_64BIT_P (x) && TARGET_SSE2_P (x)))
 #define TARGET_3DNOW   TARGET_ISA_3DNOW
 #define TARGET_3DNOW_P(x) TARGET_ISA_3DNOW_P(x)
 #define TARGET_3DNOW_A TARGET_ISA_3DNOW_A

Reply via email to