This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 28/46] i386: Emulate MMX movntq with SSE2 movntidi
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Uros Bizjak <ubizjak at gmail dot com>
- Date: Fri, 1 Feb 2019 13:17:51 -0800
- Subject: [PATCH 28/46] i386: Emulate MMX movntq with SSE2 movntidi
- References: <20190201211809.963-1-hjl.tools@gmail.com>
Emulate MMX movntq with SSE2 movntidi. Only SSE register source operand
is allowed.
PR target/89021
* config/i386/mmx.md (sse_movntq): Renamed to ...
(*sse_movntq): This.
(sse_movntq): New. Emulate MMX movntq with SSE2 movntidi.
---
gcc/config/i386/mmx.md | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md
index a832e25e9d0..569aeae98ab 100644
--- a/gcc/config/i386/mmx.md
+++ b/gcc/config/i386/mmx.md
@@ -243,7 +243,21 @@
DONE;
})
-(define_insn "sse_movntq"
+(define_expand "sse_movntq"
+ [(set (match_operand:DI 0 "memory_operand")
+ (unspec:DI [(match_operand:DI 1 "register_operand")]
+ UNSPEC_MOVNTQ))]
+ "TARGET_SSE || TARGET_3DNOW_A"
+{
+ if (TARGET_MMX_WITH_SSE)
+ {
+ rtx insn = gen_sse2_movntidi (operands[0], operands[1]);
+ emit_insn (insn);
+ DONE;
+ }
+})
+
+(define_insn "*sse_movntq"
[(set (match_operand:DI 0 "memory_operand" "=m")
(unspec:DI [(match_operand:DI 1 "register_operand" "y")]
UNSPEC_MOVNTQ))]
--
2.20.1