Fix MASM ptwrite output for Intel syntax
Fixes incorrect MASM ptwrite output when using Intel syntax by using an alternative code sequence.
The previous fix for 64-bit ptwrite caused issues with Intel syntax output in MASM. This commit uses an alternative code sequence to correctly handle MASM ptwrite when Intel syntax is enabled, where the instruction data type is defined by the operands.
In Details
The commit addresses a regression in MASM code generation for the ptwrite instruction. The original fix for 64-bit ptwrite (treating it as 32-bit) introduced a problem when generating code with Intel syntax. Intel syntax determines the instruction's data type based on the operands, which required a different approach than the prior fix. The i386.md file defines instruction patterns for the x86 target.
For Context
When GCC generates assembly code for x86 processors, it needs to handle different assembly syntaxes, such as Intel's syntax. The ptwrite instruction, used for performance monitoring, requires special handling to ensure it's encoded correctly. This patch fixes an issue where the generated ptwrite instruction was incorrect when using Intel syntax, ensuring that the correct data type is used based on the operands.