Chapter 6. Extensions to the C Language Family 1736.35. Assembler Instructions with C Expression OperandsIn an assembler instruction using asm, you can specify the operands of the instruction using C expres-sions. This means you need not guess which registers or memory locations will contain the data youwant to use.You must specify an assembler instruction template much like what appears in a machine description,plus an operand constraint string for each operand.For example, here is how to use the 68881’s fsinx instruction:asm ("fsinx %1,%0" : "=f" (result) : "f" (angle));Here angle is the C expression for the input operand while result is that of the output operand.Each has "f" as its operand constraint, saying that a floating point register is required. The = in =findicates that the operand is an output; all output operands’ constraints must use =. The constraintsuse the same language used in the machine description (Section 6.36 Constraints for asmOperands).Each operand is described by an operand-constraint string followed by the C expression in parenthe-ses. A colon separates the assembler template from the first output operand and another separates thelast output operand from the first input, if any. Commas separate the operands within each group. Thetotal number of operands is currently limited to 30; this limitation may be lifted in some future versionof GCC.If there are no output operands but there are input operands, you must place two consecutive colonssurrounding the place where the output operands would go.As of GCC version 3.1, it is also possible to specify input and output operands using symbolic nameswhich can be referenced within the assembler code. These names are specified inside square bracketspreceding the constraint string, and can be referenced inside the assembler code using %[name] insteadof a percentage sign followed by the operand number. Using named operands the above example couldlook like:asm ("fsinx %[angle],%[output]": [output] "=f" (result): [angle] "f" (angle));Note that the symbolic operand names have no relation whatsoever to other C identifiers. You mayuse any name you like, even those of existing C symbols, but you must ensure that no two operandswithin the same assembler construct use the same symbolic name.Output operand expressions must be lvalues; the compiler can check this. The input operands need notbe lvalues. The compiler cannot check whether the operands have data types that are reasonable forthe instruction being executed. It does not parse the assembler instruction template and does not knowwhat it means or even whether it is valid assembler input. The extended asm feature is most oftenused for machine instructions the compiler itself does not know exist. If the output expression cannotbe directly addressed (for example, it is a bit-field), your constraint must allow a register. In that case,GCC will use the register as the output of the asm, and then store that register into the output.The ordinary output operands must be write-only; GCC will assume that the values in these operandsbefore the instruction are dead and need not be generated. Extended asm supports input-output orread-write operands. Use the constraint character + to indicate such an operand and list it with theoutput operands. You should only use read-write operands when the constraints for the operand (orthe operand in which only some of the bits are to be changed) allow a register.You may, as an alternative, logically split its function into two separate operands, one input operandand one write-only output operand. The connection between them is expressed by constraints whichsay they need to be in the same location when the instruction executes. You can use the same C