-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustArea: Makes things more difficult for new or seasoned contributors to RustA-inline-assemblyArea: Inline assembly (`asm!(…)`)Area: Inline assembly (`asm!(…)`)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Rust inline assembly expects to be written like this:
crate::arch::asm!(
"movntps [{mem_addr}], {a}",
mem_addr = in(reg) mem_addr,
a = in(xmm_reg) a,
);
However, when dumping the output assembly via --emit asm
, it looks like this:
movntps %xmm0, (%rdi)
Operand order is swapped, and it's using (%name)
instead of [name]
. I guess one is AT&T syntax and one is Intel syntax.
Would be good if Rust could be consistent with its own inline asm syntax. :)
Metadata
Metadata
Assignees
Labels
A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustArea: Makes things more difficult for new or seasoned contributors to RustA-inline-assemblyArea: Inline assembly (`asm!(…)`)Area: Inline assembly (`asm!(…)`)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.