fdiv/fldcw_Stall indicates a penalty condition.
The floating-point instruction for which fdiv/fldcw_Stall is issued cannot begin executing until the previous FDIV or FLDCW instruction finishes executing its latency clocks. No other floating-point instruction can execute while FDIV or FLDCW executes.
Follow these guidelines to prevent the penalty condition:
Organize your code so that integer instructions execute while the FLDCW or FDIV instruction executes its latency clocks.
Schedule other floating-point instructions for execution only after the FLDCW or FDIV instruction finishes executing.
Example:
Original |
Cycle |
Optimized |
Cycle |
---|---|---|---|
|
|
|
|
No other floating-point instruction can execute while FDIV
executes. Therefore, Instruction 2 stalls 38 cycles until FDIV
finishes executing. |
The code is reorganized so that integer instructions
execute in parallel to FDIV. |