[llvm-commits] [llvm] r156714 - in /llvm/trunk: lib/MC/MCParser/AsmParser.cpp test/MC/AsmParser/macro-rept-err1.s test/MC/A
Zhang, Andy
andy.zhang at intel.com
Thu Jul 19 14:19:57 PDT 2012
Hi PaX,
On July 19, 2012 4:09 PM, PaX Team wrote:
>
> On 17 Jul 2012 at 17:36, Zhang, Andy wrote:
>
> Hi Andy,
>
<snip>
>
> as you can see, GNU as doesn't treat the various arithmetic operators
> in a consistent way, and given the purpose of whitespace separated
> macro arguments, i consider the handling of +,-,/ above an error (well,
> undefined/unintended) and went for the consistent behaviour in
> integrated-as instead (i.e., treat all whitespace as argument
> separators).
>
On non-Darwin platforms, the previous behavior of invoking a macro with an expression will not work anymore, even if the user still uses commas to delimit arguments. I agree that allowing spaces to delimit arguments introduces ambiguity, but I think we should preserve compatibility as much as possible with source files written for the LLVM assembler prior to this change, while still allowing gas code to compile.
> > Any idea why exprs.s is only being tested for Darwin?
>
> given the above issues, the way exprs.s is written, it's not in gas
> syntax (you can try GNU as on it btw ;).
>
I have a patch for space-delimited arguments, that incorporates your changes for default parameter values and error message improvements, that can parse obvious expressions (eg, "a - b"). I also fixed the assertion failure when parsing ".if ($0) != ($1)" on non-Darwin in your patch.
I think we can get the best of both worlds this way :)
- Andy
More information about the llvm-commits
mailing list