I've just come across a pretty significant issue with Intel syntax: some symbol names can't be represented.
mov eax, eax # is this a symbol or a register
There doesn't appear to be a solution https://sourceware.org/bugzilla/show_bug.cgi?id=37
LLVM's internal assembler seems to be able to parse quoted strings as symbols:
But that doesn't work in GAS:
"eax" is still parsed as a register name
I don't really see how that's significant for Rust inline asm, can you elaborate? One would have to deliberately give a symbol one of these names with
#[no_mangle] (and use it with intel-style asm) to run into this, and platform-/toolchain-dependent breakage when giving symbols certain "reserved" names is nothing new or specific to inline asm. It also isn't novel that assemblers have all sorts of weird corner cases that vary between implementations or versions.
It is significant because we provide a
sym operand type which will insert the symbol of a given
fn into the asm code.
You would expect this to work correctly for all symbol names.
I realize that, but as I said you'd have to deliberately pick such a name with
#[no_mangle] and when you do that, there's a million things other than inline asm that can break depending on the name.
Eh, fair enough.