<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/99735>99735</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [x86] Assembly Errors
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          witbring
      </td>
    </tr>
</table>

<pre>
    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

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyklN1u2zYUx5-GujmIQVGWZV3oIo7rrRiKFV2ArbsZKPFY4kCRKg8ZO3v6gZZSx9mKYahh0Pz4n68fjymJdG8RG1buWLnPZAyD881Jh9Zr22etU8_Ne1CaOveEHhWEQQZ4MNL20KNFLwMSRBspSgPaUvCxC9pZgtOAFibvOiTStocwILANR_ulGxXbcJBWXTco7bipcwppxfie8ft5_BE9MlERSCA5TgYhaYCsniYMrFhkbMOX72W50jag-YOebZBnsG7yeNTnF7_1HBN2vzHxAL9_-PDrz5_28PHxE7Byl7NyPwth-SwZ_pf8TQrzOKOi2CUMx2jMM0giHFuDlJAQ3lBbweOAifeLSM2w7zo3TjotL9VrAhrcyUKLxp2-BWFJHNozEw-s3Cl9LU0qlUrbvy4F5TkJxEOa3Mh2nx_f_UMlzU0Y-o44_4ruvYXO2eAlhcT9h_tfUjup2CEBeu88jEgkeyQ4On_pL5Lj3B_fQhLGaUWsuIf7he_VyVeTF41IuncpUJpES3GanA-oXt_Yq5YW1a198f_s6auDNzl_dhE6acHjUv7SNx4pmgDOQu9U68z1zzCEMF3qEQcmDsvpyvmeicNfTByqj0_W1z998bM8U02h6qKWGTZ5JfL1eiPyPBsaLivcHpFv1h2qervBLq-qXPAjlpxv2m2mG8HFmleC86Lgeb6q5LEqcYvHohbbuijYmuMotVkZ8zSmDDJNFLGp66ooMyNbNHR5fISweILLIRMivUW-STZ3beyJrbnRFOjqJehgLq_Webth5f7lOp9n3pRFb5o3FHQYYrvq3MjEIflZfu4m7_7ELjBxuEQnJg5zdk-N-DsAAP__QCWSHw">