http://llvm.org/bugs/show_bug.cgi?id=18919
Bug ID: 18919
Summary: Clang integrated assembler does not handle :vararg
macro arguments
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Created attachment 12095
--> http://llvm.org/bugs/attachment.cgi?id=12095&action=edit
example assembly code (ARM).
I use an assembly macro like this:
.if cc
\zzz
.endif
.endm
.set cc,1 /* normally something complicated */
...
ifcc sub r12, r5, LSL #6
bx r12
This way I can stub out several instructions in a routine without needing to
cloud the code with lots of conditional assembly. Typically I set cc to some
macro parameter to get different variants without excessive copy-paste.
Unfortunately:
% clang --target=arm-linux-gnueabihf -integrated-as ifcc.S
ifcc.S:1:17: error: vararg is not a valid parameter qualifier for 'zzz' in
macro 'ifcc'
.macro ifcc zzz:vararg
^
ifcc.S:2:5: error: expected absolute expression
.if cc
^
ifcc.S:3:13: error: unexpected token at start of statement
\zzz
^
ifcc.S:5:6: error: unexpected '.endm' in file, no current macro definition
.endm
^
ifcc.S:12:14: error: unexpected token in argument list
ifcc sub r12, r5, LSL #6
^
While the GNU assembler sees no problems.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs