(Weird?) assembly macro expansion

Hi,

I have a question regarding assembly macro expansion in Clang. Google hasn’t been helpful in turning up documentation and before I start investing a lot of time in reading source, I thought I’d ask for a quick pointer here.

We have code like this in our kernel:

.macro DO_SYSEXIT
addl $8, %esp /* skip ecx & edx */

Now Clang seems to interpret $8 as an insertion point for a (non-existing) parameter, which leads to the following error:

:1:6: error: unknown token in expression
addl , %esp
^

Question: why?

I haven’t found any documentation concerning this, any pointers or explanations will be vastly appreciated, as I don’t want to go to town on our code and change everything to addl $$8, … which works, but that’s not the way it should be, right? Disclaimer: I really don’t have any experience with assembly, from what I know I assume that Clang uses AT&T syntax?

Thanks in advance,
Hermann

Can you give a complete testcase and the output of clang --version?

-Eli