Syntax for asm in clang

I'm working with some code that has inline asm. While it compiles and runs correctly with gcc (4.9), clang (3.5.0) is giving compile errors. No doubt this is due to variations in what is supported in gcc and clang for the very compiler-specific asm command.

I was hoping to resolve this myself by looking at the docs, but I'm not finding anything that details what clang's asm supports (other than saying "highly compatible" with GCC). Does anyone have a link?

Assuming I didn't just miss where this is doc'ed, perhaps someone with more clang experience can suggest how to emulate gcc's %z modifier (see

In short, %z0 is expanded in inline asm strings to one of b/w/l/q (byte, word, long, qword), depending on the type of parameter 0. This is useful for cases where the type cannot be inferred from the operators, for example "rep stos%z0". While there are ways to do this manually, I'm hoping clang provides something (macro? intrinsic? different modifier?) similar to gcc.