<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/132074>132074</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [ms] [llvm-ml] Support macros with parenthesis and commas delimiters between arguments
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          MisterDA
      </td>
    </tr>
</table>

<pre>
    I have a MASM file that has a macro that I call with parenthesis and which uses a comma as a delimiter between arguments, as parameters may contain spaces:

```asm
        i = 0
SubstitutionMacro MACRO _type:REQ, name:REQ
        field_&name EQU i
        i = i + 1
 EXITM <>
ENDM

SubstitutionMacro(int, a)
SubstitutionMacro(int*, b)
SubstitutionMacro(struct type, c)
SubstitutionMacro(struct type*, d)
 .CODE
        mov r12, field_a
        mov r13, field_b
        mov r14, field_c
        mov r15, field_d
        END
```

`llvm-ml` currently fails at assembling this file:

``` console
$ ml64 -nologo -Cp -c -Fo test.obj test.asm
 Assembling: test.asm
$ objdump -D --section='.text$mn' test.obj

test.obj:     file format pe-x86-64


Disassembly of section .text$mn:

0000000000000000 <.text$mn>:
   0:   49 c7 c4 00 00 00 00    mov    $0x0,%r12
   7:   49 c7 c5 01 00 00 00    mov    $0x1,%r13
   e:   49 c7 c6 02 00 00 00    mov $0x2,%r14
  15:   49 c7 c7 03 00 00 00    mov    $0x3,%r15
```

Cf #129905 cc @ericastor 
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyMVMGOozgU_Brn8kRkbAzJgQMTEqkPmdFM70p7GxnjBLdsjGzT3fn7lSHppJft1SKiBNerV364Utx7de6lLBH7hli94mPorCuPygfp6mrV2PZSPkHHXyVwOFbPRzgpLSF0PEDHPXAwXDg7LzyB4FrDmwodDNzJPnTSKw-8b-GtU6KD0cvIEdYYDhO9lVoZFaSDRoY3KXvg7jwa2QeP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