Here are constraint modifier characters.
=
’+
’When the compiler fixes up the operands to satisfy the constraints, it needs to know which operands are read by the instruction and which are written by it. ‘=
’ identifies an operand which is only written; ‘+
’ identifies an operand that is both read and written; all other operands are assumed to only be read.
If you specify ‘=
’ or ‘+
’ in a constraint, you put it in the first character of the constraint string.
&
’‘&
’ 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.
A operand which is read by the instruction 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 read operands can be affected by the earlyclobber. See, for example, the ‘mulsi3
’ insn of the ARM.
Furthermore, if the earlyclobber operand is also a read/write operand, then that operand is written only after it's used.
‘&
’ does not obviate the need to write ‘=
’ or ‘+
’. As earlyclobber operands are always written, a read-only earlyclobber operand is ill-formed and will be rejected by the compiler.
%
’%
’ applies to all alternatives and must appear as the first character in the constraint. Only read-only operands can use ‘%
’. 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.
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-6.3.0/gcc/Modifiers.html