With GCC, the '&' character can be used to specify an "earlyclobber" operand of asm modules. I was reading a piece of code that used this for an output constraint, and got into reading more about what it's for. I'm pretty confused by the generic definition that seems to be everywhere I look, however..
Quote:
Means (in a particular alternative) that this operand is an earlyclobber operand, which is modified before the instruction is finished using the input operands. Therefore, this operand may not lie in a register that is used as an input operand or as part of any memory address.
& applies only to the alternative in which it is written. In constraints with multiple alternatives, sometimes one alternative requires & while others do not. See, for example, the movdf insn of the 68000.
An input operand can be tied to an earlyclobber operand if its only use as an input occurs before the early result is written. Adding alternatives of this form often allows GCC to produce better code when only some of the inputs can be affected by the earlyclobber.
& does not obviate the need to write =
|
Could anybody explain this more clearly? I understand the concept of a clobber list, which is separate from the specific constraints, but I'm confused as to how this applies to a specific operand.