User account creation filtered due to spam.
I saw directives after '%' in glibc's code:
asm volatile ("movl %1, %0\n" : "=r" (a) : "i" (0x1234));
asm volatile ("movl %c1, %0\n" : "=r" (a) : "i" (0x1234));
asm volatile ("movl %P1, %0\n" : "=r" (a) : "i" (0x1234));
Currently I know the first line generates a imm load instruction (movl $0x1234, %eax), the second and the third line generate memory load operations (movl 0x1234, %eax). However, I don't know the difference between "%P" and "%c" directives. I read through section 5.37 and 5.38 of gcc.info (5.37 is Assembler Instructions with C Expression Operands; 5.38 is Constraints for `asm' Operands) but find nothing about them.
Where to find documentation of them? Does gcc.info contain some information?
Machine-independent templates are described in gccint.info, in the "Output Templates and Operand Substitution" section. Online documentation is here: <http://gcc.gnu.org/onlinedocs/gccint/Output-Template.html>. See also: <http://gcc.gnu.org/viewcvs/trunk/gcc/final.c?revision=157325&view=markup#l3194>.
But it seems that x86-specific templates are not documented; see description of them in the sources: <http://gcc.gnu.org/viewcvs/trunk/gcc/config/i386/i386.c?revision=157325&view=markup#l11384>.
covers these in general now, though I did not see "%P" covered.
This is a duplicate of 30527.
A subset of the most commonly needed/used modifiers have been added to the docs as of 5.x (including the %c1 referenced above).
%P (also mentioned above) is not currently documented, and I see no reason that it should be. An examination of glibc suggests that instead of using the undocumented/unsupported %P1, they can accomplish what they need with the already documented %c1.
*** This bug has been marked as a duplicate of bug 30527 ***