https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128507
Bug ID: 128507
Summary: asm att syntax error: movzww (%rax),%ax
Product: gcc
Version: 15.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: romph at gmx dot net
Target Milestone: ---
The asm(...) command in att syntax:
"movzww (%rax),%ax;"
generates the error
Error: invalid instruction suffix for `movzw'
The intel syntax version works without errors.
asm
(
".intel_syntax noprefix;"
"movzx ax,WORD PTR [rax];"
"movzx eax,WORD PTR [rax];"
"movzx rax,WORD PTR [rax];"
".att_syntax noprefix;"
// Error: invalid instruction suffix for `movzw'
//"movzww (%rax),%ax;"
"movzwl (%rax),%eax;"
"movzwq (%rax),%rax;"
);