Skip to content

Commit c68f9a7

Browse files
authored
Merge pull request #614 from joshtriplett/inline-asm-att
Mention `option(att_syntax)`
2 parents ebd895a + d6f3706 commit c68f9a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

posts/inside-rust/2020-06-08-new-inline-asm.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ Notice that `value` and `popcnt` have registers selected for them, while
125125
`bits.as_mut_ptr()` must go in the `rdi` register for use with the `stosb`
126126
instruction.
127127

128+
Also, note that on x86 platforms, `asm!` uses Intel syntax by default; however,
129+
you can use AT&T syntax with `option(att_syntax)`. You may find this useful
130+
when translating existing inline assembly code to the new `asm!` syntax.
131+
128132
For full details on the new `asm!` syntax, see [RFC
129133
2873](https://github.com/Amanieu/rfcs/blob/inline-asm/text/0000-inline-asm.md).
130134
Please try it out (including translating existing inline assembly to the new

0 commit comments

Comments
 (0)