[llvm-commits] [llvm] r125595 - in /llvm/trunk: lib/MC/MCParser/AsmParser.cpp test/MC/AsmParser/exprs.s test/MC/AsmParser/paren.s

Rafael Avila de Espindola rafael.espindola at gmail.com
Wed Feb 16 15:25:04 PST 2011


> 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?

Yes, that is bad. So, the two questions are

* Should be support [] at all
* If yes, everywhere?

I so far have seem [] being used only one file and updated that one file 
:-) I think Joerg mentioned it being common on old BSD code, so we might 
have to support it.

You have a valid argument as for why it is better to not support it is 
some arches, so maybe we need to make this conditional.

Joerg, how common are assembly files with [] in them? If common, can you 
code a patch making [] conditional on x86(-64) ELF?

> -Jim

Cheers,
Rafael



More information about the llvm-commits mailing list