[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
Thu Feb 24 09:53:18 PST 2011


On Feb 24, 2011, at 8:13 AM, Rafael Avila de Espindola wrote:

>>> Just a nit, it looks like it is a Mach-O X ELF, not X86 x ARM.
>>> 
>>> Just to be sure, would this be a desirable feature for X86 Darwin?
>> 
>> Sure, I'd like the mc assembler to be as consistent as reasonable across different OS's.
> 
> OK, so the summary so far is
> 
> *) Disabled for Mach-O ARM
> *) Enabled for Mach-O X86
> *) Enabled for ELF ARM and X86
> 
> It was also requested that the default be off.

This sounds fine to me. I'd marginally prefer that it be disabled for X86/MachO, but I don't feel strongly about that. I do feel that the default should be Disabled, as many archs use square brackets for memory references and will thus encounter the same sorts of parsing ambiguities that ARM does.

For implementation specifics, I agree a member var in the MCAsmParser class with getter/setter methods should do the trick. Targets that want to enable the flag just call the setter in their TargetAsmParser constructor. Should be very simple and interface trivially with the prior patch.

-Jim



More information about the llvm-commits mailing list