Skip to content

[x86] Assembly Errors #99735

Closed
Closed
@witbring

Description

@witbring

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions