It seems that I can use "%k0" (rather than just "%0") in an asm template to force the (register) operand to "long" size (i.e. a value in %al referenced as %k0 comes out as %eax in the generated assembly).
This doesn't seem to be documented anywhere. I presume there may be other such character prefixes which have similar functions. -- Summary: Use of input/output operands in __asm__ templates not fully documented Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: davmac at davmac dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30527