I understand when to use the list of shoemakers (for example, listing the register that was changed in the assembly so that it is not selected for use as an input register, etc.), but I can not wrap my head around the restriction of early clobber & . If you list your outputs, does this mean that the inputs cannot use the selected register (in addition to the corresponding value restrictions)?
For instance:
asm( "movl $1, %0;" "addl $3, %0;" "addl $4, %1;" "addl %1, %0;" : "=g"(num_out) : "g"(num_in) : );
Is & required for output variables? The compiler must know the register that was selected for output, and therefore should not use it for input.
source share