5-4
Motorola DSP56000 Family Optimizing C Compiler User’s Manual
For More Information On This Product,
Go to: www.freescale.com
Motorola
In-line Assembly Code
where:
1.
modifier
is a single optional character which specifies a particular class of
operand. The available modifiers are ‘
j
’, ‘
e
’, ‘
h
’, ‘
k
’, ‘
g
’, ‘
i
’, ‘
f
’, ‘
p
’, and ‘
q
’.
j
—an offset register (
nx
) associated with the corresponding address registers
(
rx
). Since the offset register is paired with the address register, the allocated
offset register has the same index as the address register (see Section in Section
5.2.4).
e
—
a1
or
b1
, upper word of the destination registers
a
or
b
(see Section in
Section 5.2.4).
h
—
a0
or
b0
, lower word of the destination registers
a
or
b
(see Section in
Section 5.2.4).
k
—
a2
or
b2
, extension register of the destination register,
a
or
b
(see Section
in Section 5.2.4).
g
—Select the 24-bit portion of the 48-bit ALU register (
x
or
y
) that is not
occupied by data pointed to by the operand id — e.g., if the operand id points to
x0
then
x1
is selected and similarly
x1
→
x0
,
y0
→
y1
,
y1
→
y0
(see Section and
Section 5-9 in Section 5.2.4).
i
—strip the
0
or
1
from the allocated register name i.e.,
a1
→
a
,
a0
→
a
,
b1
→
b
,
b0
→
b
(see Section in Section 5.2.4).
f—
insert the memory space identifier (
x
or
y
) for the memory location (see
Section in Section 5.2.4).
p—
generate an immediate 16-bit constant without # sign (see Example in
Section 5.2.4).
q—
generate an immediate 24-bit constant without # sign (see Section in
Section 5.2.4).
2.
operand_id_number
specifies the operand location in the operand descriptor list
(see Section in Section 5.2.4). The operand descriptor list is a concatenation of the
output operands and input operands (see Section 5.2.2). The first operand is labeled
zero and there can be up to 31 more operands in the list. More than one instruction
template can be used if more than 32 operands are needed.
In-line assembly code can also be used to insert a label directly into the compiler output. A
label without any white spaces in the in-line assembly code instruction template will
guarantee that the same template label will be in the compiler output (see Section ). Care
should be taken not to use labels that the C compiler generates. Using the same labels as
the C compiler will cause a duplicate label error (see Section 4.7, "Compiler Naming
Conventions," on page 4-13.)
F
Freescale Semiconductor, Inc.
n
.