The following code fragment (simplified from Xorg display driver sources)
static void foo(void)
int a, b;
asm ( "movsl" : "=%c" (a) : "0" (b) );
fails to compile, with
foo.c, line 6: bad xasm constraint %
I don't much understand this, but according to the gcc online docs I found at http://gcc.gnu.org/onlinedocs/gcc/Modifiers.html#Modifiers
the '%' modifier signifies:
Declares the instruction to be commutative for this operand and the following operand. This means that the compiler may interchange the two operands if that is the cheapest way to make all operands fit the constraints. GCC can only handle one commutative pair in an asm; if you use more, the compiler may fail. Note that you need not use the modifier if the two alternatives are strictly identical; this would only waste time in the reload pass. The modifier is not operational after register allocation, so the result of define_peephole2 and define_splits performed after reload cannot rely on `%' to make the intended insn match.
and thus perhaps it is an optimisation hint that can be safely ignored?