The earlier 64bit ptwrite as 32bit fix broke Intel syntax output. Handle
that too by using an alternative. In Intel syntax the instruction
data type is defined by the operands.
I'll commit it as obvious in a day or so for 15/16/trunk, unless there
are objections.
PR target/125351
gcc/ChangeLog:
* config/i386/i386.md: Use alternative to handle masm ptwrite
syntax.
gcc/testsuite/ChangeLog:
* gcc.target/i386/pr125351.c: New test.
[(unspec_volatile [(match_operand:SWI48 0 "nonimmediate_operand" "rm")]
UNSPECV_PTWRITE)]
"TARGET_PTWRITE"
- "ptwrite<imodesuffix>\t%0"
+ "ptwrite{<imodesuffix>|}\t%0"
[(set_attr "type" "other")
(set_attr "prefix_0f" "1")
(set_attr "prefix_rep" "1")])
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-mptwrite -masm=intel" } */
+void foo() { __builtin_ia32_ptwrite32(0); }