-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Closed
Labels
llvm-toolsAll llvm tools that do not have corresponding tagAll llvm tools that do not have corresponding tag
Description
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:
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
ENDllvm-ml currently fails at assembling this file:
$ 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
$ llvm-ml64 -c -Fo test.obj test.asm
test.asm:10:40: error: too many positional arguments
SubstitutionMacro(struct type, c)
^
test.asm:10:41: error: expected section directive before assembly directive
SubstitutionMacro(struct type, c)
^
test.asm:11:41: error: too many positional arguments
SubstitutionMacro(struct type*, d)
^Cf #129905 cc @ericastor
Metadata
Metadata
Assignees
Labels
llvm-toolsAll llvm tools that do not have corresponding tagAll llvm tools that do not have corresponding tag