Index: lib/MC/MCParser/AsmParser.cpp =================================================================== --- lib/MC/MCParser/AsmParser.cpp +++ lib/MC/MCParser/AsmParser.cpp @@ -1996,7 +1996,7 @@ if (ParenLevel == 0 && Lexer.is(AsmToken::Comma)) break; - if (Lexer.is(AsmToken::Space)) { + if (ParenLevel == 0 && Lexer.is(AsmToken::Space)) { Lex(); // Eat spaces // Spaces can delimit parameters, but could also be part an expression. @@ -2011,9 +2011,8 @@ AddTokens = 2; } - if (!AddTokens && ParenLevel == 0) { + if (!AddTokens) break; - } } } Index: test/MC/AsmParser/macros-gas.s =================================================================== --- test/MC/AsmParser/macros-gas.s +++ test/MC/AsmParser/macros-gas.s @@ -39,10 +39,10 @@ .ascii "\_a \_b \_c" .endm -// CHECK: .ascii "1 (23) " +// CHECK: .ascii "1 (2 3) " test3_prime 1, (2 3) -// CHECK: .ascii "1 (23) " +// CHECK: .ascii "1 (2 3) " test3_prime 1 (2 3) // CHECK: .ascii "1 2 "