On 23.02.2026 17:06, Andrew Cooper wrote:
> On 23/02/2026 4:02 pm, Jan Beulich wrote:
>> On 23.02.2026 11:04, Edwin Török wrote:
>>> clang-21's built-in assembler is enabled by default, but it doesn't
>>> support some mnemonics:
>>> ```
>>> test_x86_emulator.c:2636:36: error: invalid instruction mnemonic 'fsaves'
>>>  2636 |                        "fidivs %1\n\t"
>>> test_x86_emulator.c:2640:24: error: invalid instruction mnemonic 'frstors'
>>>  2640 |         asm volatile ( "frstors %0" :: "m" (res[25]) : "memory" );
>>>       |                        ^
>>> test_x86_emulator.c:4251:24: error: invalid instruction mnemonic 
>>> 'vpcmpestriq'
>>>  4251 |                        put_insn(vpcmpestri,
>>>       |                        ^
>>> ```
>> Was this reported to them as a bug (or perhaps even two)?
> 
> Looking at just one of these, the mnemonic is FRSTOR without an S, and
> Clang 21 is happy with that.
> 
> What is the trailing S supposed to signify to GAS?

"short", i.e. the want for a 16-bit operand size prefix. Just like in
vpcmpestriq the request is for a REX64 prefix. Suffixes are the way to
go in AT&T syntax when operands alone can't disambiguate operand size.
The less nice alternative are data16 prefixes; not sure if Clang would
support those.

Jan

Reply via email to