-
Notifications
You must be signed in to change notification settings - Fork 15.7k
Description
| Bugzilla Link | 18919 |
| Resolution | FIXED |
| Resolved on | Jun 19, 2014 21:46 |
| Version | trunk |
| OS | Linux |
| Blocks | #19300 |
| Attachments | example assembly code (ARM). |
| Reporter | LLVM Bugzilla Contributor |
| CC | @compnerd,@rengolin |
Extended Description
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.