Using Word Access for Short Data and Doubleword Access for Floating-Point Data
6-23
Optimizing Assembly Code via Linear Assembly
LDDWs, MPYSPs, and ADDSPs on each side. To keep both sides even, place
the remaining two instructions, B and SUB, on opposite sides.
Figure 6–6. Dependency Graph of Floating-Point Dot Product With LDDW
B side
A side
bi & bi+1
ai & ai+1
pi+1
pi
5
5
5
5
4
4
sum0
sum1
cntr
LOOP
4
4
1
1
LDDW
MPYSP
MPYSP
ADDSP
SUB
B
ADDSP
LDDW
6.4.4
Linear Assembly Resource Allocation
After splitting the dependency graph for both the fixed-point and floating-point
dot products, you can assign functional units and registers, as shown in the
dependency graphs in Figure 6–7 and Figure 6–8 and in the instructions in
Example 6–17 and Example 6–18. The .M1X and .M2X represent a path in the
dependency graph crossing from one side to the other.