Chapter 6. Extensions to the C Language Family
asm ("fsincos" : "=t" (cos), "=u" (sin) : "0" (inp));
This asm takes two inputs, which are popped by the
output. The user must code the
asm ("fyl2xp1" : "=t" (result) : "0" (x), "u" (y) : "st(1)");
6.38. Constraints for
Here are specific details on what constraint letters you can use with
say whether an operand may be in a register, and which kinds of register; whether the operand can be
a memory reference, and which kinds of address; whether the operand may be an immediate constant,
and which possible values it may have. Constraints can also require two operands to match.
6.38.1. Simple Constraints
The simplest kind of constraint is a string full of letters, each of which describes one kind of operand
that is permitted. Here are the letters that are allowed:
whitespace
Whitespace characters are ignored and can be inserted at any position except the first. This en-
ables each alternative for different operands to be visually aligned in the machine description
even if they have different number of constraints and modifiers.
m
A memory operand is allowed, with any kind of address that the machine supports in general.
o
A memory operand is allowed, but only if the address is offsettable. This means that adding a
small integer (actually, the width in bytes of the operand, as determined by its machine mode)
may be added to the address and the result is also a valid memory address.
For example, an address which is constant is offsettable; so is an address that is the sum of a regis-
ter and a constant (as long as a slightly larger constant is also within the range of address-offsets
supported by the machine); but an autoincrement or autodecrement address is not offsettable.
More complicated indirect/indexed addresses may or may not be offsettable depending on the
other addressing modes that the machine supports.
Note that in an output operand which can be matched by another operand, the constraint letter
is valid only when accompanied by both
and
(if the target machine has preincrement addressing).
V
A memory operand that is not offsettable. In other words, anything that would fit the
but not the
constraint.
o
A memory operand with autodecrement addressing (either predecrement or postdecrement) is
allowed.
clobber for reg-stack.c to know that
st(1)
Operands
asm
(if the target machine has predecrement addressing)
opcode, and replaces them with one
fyl2xp1
fyl2xp1
asm
pops both inputs.
operands. Constraints can
constraint
m
161
o
Need help?
Do you have a question about the ENTERPRISE LINUX 3 - USING GCC and is the answer not in the manual?
Questions and answers