EasyManua.ls Logo

Freescale Semiconductor MC68881 - Rolled Version of Linpack Loop; FMOVE Instruction Execution Times

Default Icon
409 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
5
execution times in SECTION 8 INSTRUCTION EXECUTION TIMING for arithmetic instruction
execution times. Table 5-7 lists execution times for some FMOVE i.nstructions.
Table 5-7. FMOVE Instruction Execution Times
Execution
Operand Type Time
(Clocks)
FMOVE.X FPx,FFy 21
FMOVE.D <ea>,FPy 39
FMOVE.D FPy,<ea> 55
5.1.2.4 PERFORMANCE IMPROVEMENT EXAMPLE. The DAXPY subroutine inner loop of
the Linpack benchmark (Linpack loop) is an appropriate example for illustrating optimi-
zation for the MC68882. Figure 5-4 shows the source code for the rolled version of the
Linpack loop.
* VECTOR TIMES A CONSTANT PLUS A VECTOR
* Xli) = Y(i)*C + X(i)
L00PTOP
M0VE, L #count.D0
FMOVE.D <ea_C>,FP0
FMOVE.X FP0,FP1
FMULD <eLY(i)>,FPt
FAOD.D <ea..X{i),FP1
FMOVE.D FPl,<ea_X(iJ
DBRA DO, LOOPTOP
Figure 5-4. Rolled Version of Linpack Loop
Optimization of this code for the MC68882 consists of unrolling the loop, and rearranging
the FMOVE instructions. Notice that FP1 contains the result of the computations using
index il and that FP2 contains the result of the computations using index i + 1. Also notice
that the two FMOVE instructions that move registers to registers are executed following
FADD instructions, and that the FMOVE instructions that move registers to effective ad-
dresses are executed following FMUL instructions. Figure 5-5 shows the source code for
the optimized Linpack loop.
5.2 SYSTEMS PROGRAMMING
The guidelines for systems programming relate to exception processing. The sizes of the
state frames stored by exception handlers are discussed first. Next, the section discusses
the FSAVE, BSET, and FRESTORE instructions required in exception handlers. Then, the
handling of specific exceptions is discussed. Code that detects the presence of a floating-
point coprocessor and identifies the coprocessor is also discussed.
5.2.1 State Frame Sizes
The sizes of the state frames stored by the FSAVE instruction differ for the MC68882 and
MC68881, as shown in Table 5-8.
FREESCALE
5-10
MC68881/MC68882 USER'S MANUAL

Table of Contents

Related product manuals