[llvm-commits] [llvm] r125595 - in /llvm/trunk: lib/MC/MCParser/AsmParser.cpp test/MC/AsmParser/exprs.s test/MC/AsmParser/paren.s
Jim Grosbach
grosbach at apple.com
Wed Feb 16 13:55:20 PST 2011
On Feb 16, 2011, at 10:28 AM, Rafael Avila de Espindola wrote:
>> That's not a choice that's up to us. We're not deciding what the syntax is. We're supporting existing (hopefully documented) syntax.
>
> So we need to support what gas does, but we can support a superset of it
> when we find some advantaged in doing so.
Close, but not quite. We have to support the documented syntax for the target. In many cases that's de-facto the documented gas behavior. Even then, gas has a lot of undocumented extensions, however. We can and should decide whether to support those on a case by case basis. Just like deciding what to do with GCC's language extensions in clang.
> Is there a case where handling [] changes the meaning of a valid asm
> file or we now just accept more code then gas does?
Brackets have well-defined meaning in lots of asm dialects (memory references, etc). Overloading that to mean something else in expressions is dubious at best.
For example,
ldr r0, [r5]
Is that an expression referring to a symbol named r5, or is it an indirect memory reference via register 5?
-Jim
More information about the llvm-commits
mailing list