Closed
Description
I discovered that Clang generates unusual instructions when processing the enqcmd
and enqcmds
opcodes.
Here's a sample code snippet:
.intel_syntax noprefix
enqcmd BX, ZMMWORD PTR [1]
enqcmds BX, ZMMWORD PTR [1]
Clang successfully assembles these instructions. The disassembled Clang-compiled code is shown below:
enqcmd bx,[di]
add DWORD PTR [eax],eax
add BYTE PTR [eax],al
enqcmds bx,[di]
add DWORD PTR [eax],eax
In contrast, GAS produces error messages for the same code:
tmp.s: Assembler messages:
tmp.s:2: Error: unsupported instruction `enqcmd'
tmp.s:3: Error: unsupported instruction `enqcmds'
You can reproduce these result on godbolt:
https://godbolt.org/z/7Pvnr9Kqr