[PATCH] D13592: [MC] Fixed parsing of macro arguments where expressions with spaces are present.

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 10 08:39:51 PDT 2015


dsanders added a comment.

> Fixed an issue for mips where an instruction such as:

>  sdc1 $f1, SC_FPREGS+8(a0) would return an error as SC_FPREGS and +8 are

>  interpreted as two arguments instead of an expression.


I believe you've missed a key part of the problem description here. I don't have the original test to hand so I might not have this exactly right but it was about the expansion of a macro where the arguments to the macro were 'sdc1 $f1, SC_FPREGS+8(a0)'. After pre-processing, it would end up as something like 'macroname sdc1 $f1, 32 +8(a0)' which was parsed a macro named 'macroname' followed by four arguments ('sdc1', '$f1', '32', '+8(a0)'). The macro was expecting three arguments.

Could you update the description?

In http://reviews.llvm.org/D13592#263958, @vkalintiris wrote:

> Tests? Also, the macro-gas.s test case change should be in a separate patch.


+1 to needing a minimal version of the original test case in the patch.

The whitespace change in macro-gas.s is necessary though. The bug was about how the parser handles expressions-with-spaces and whitespace separated arguments. The updated test checks for the same string as GAS emits.


http://reviews.llvm.org/D13592





More information about the llvm-commits mailing list