+2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
+
+ PR target/85473
+ * config/i386/i386.c (ix86_expand_builtin): Change memory
+ operand to XI, extend p0 to Pmode.
+ * config/i386/i386.md: Change unspec volatile and operand
+ 1 mode to XI, change operand 0 mode to P.
+
2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
arg1 = CALL_EXPR_ARG (exp, 1);
op0 = expand_normal (arg0);
op1 = expand_normal (arg1);
- mode0 = (TARGET_64BIT ? DImode : SImode);
- op0 = force_reg (mode0, op0);
- if (!memory_operand (op1, mode0))
- op1 = gen_rtx_MEM (mode0, op1);
+ op0 = ix86_zero_extend_to_Pmode (op0);
+ if (!address_operand (op1, VOIDmode))
+ {
+ op1 = convert_memory_address (Pmode, op1);
+ op1 = copy_addr_to_reg (op1);
+ }
+ op1 = gen_rtx_MEM (XImode, op1);
insn = (TARGET_64BIT
? gen_movdir64b_di (op0, op1)
[(set_attr "type" "other")])
(define_insn "movdir64b_<mode>"
- [(unspec_volatile:SWI48[(match_operand:SWI48 0 "register_operand" "r")
- (match_operand:SWI48 1 "memory_operand")]
+ [(unspec_volatile:XI[(match_operand:P 0 "register_operand" "r")
+ (match_operand:XI 1 "memory_operand")]
UNSPECV_MOVDIR64B)]
"TARGET_MOVDIR64B"
"movdir64b\t{%1, %0|%0, %1}"
+2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
+
+ PR target/85473
+ * gcc.target/i386/pr85473-1.c: New test.
+ * gcc.target/i386/pr85473-2.c: New test.
+
2018-04-25 Nathan Sidwell <nathan@acm.org>
Jakub Jelinek <jakub@redhat.com>
--- /dev/null
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-require-effective-target maybe_x32 } */
+/* { dg-options "-O2 -mx32 -maddress-mode=short -mmovdir64b" } */
+/* { dg-final { scan-assembler "movdir64b\[ \\t\]" } } */
+
+unsigned int w[5] __attribute__((aligned(64)));
+
+void
+foo ()
+{
+
+ unsigned int array[] = {1, 2, 3, 4, 5};
+ __builtin_ia32_movdir64b(w, array);
+}
+
--- /dev/null
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-require-effective-target maybe_x32 } */
+/* { dg-options "-O2 -mx32 -maddress-mode=long -mmovdir64b" } */
+/* { dg-final { scan-assembler "movdir64b\[ \\t\]" } } */
+
+#include "pr85473-1.c"
+