AN2203 Freescale Semiconductor / Motorola, AN2203 Datasheet - Page 22

no-image

AN2203

Manufacturer Part Number
AN2203
Description
MPC7450 RISC Microprocessor Family Software Optimization Guide
Manufacturer
Freescale Semiconductor / Motorola
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AN22030A
Manufacturer:
PANASONIC/松下
Quantity:
20 000
Fetch/Branch Considerations
As Table 3-7 shows, the inner loop termination branch does not need to be predicted and is executed as a
fall-through branch. Instructions in the outer loop start dispatching in cycle 8, saving five cycles over the
code in Table 3-6. Note that because mtctr is execution serialized, it does not complete until cycle 16;
nevertheless, the CTR value is forwarded to the BPU by cycle 11. This early forwarding starts for a
mtctr/mtlr when the instruction reaches reservation station 0 of the IU2 and the source register for the
mtctr/mtlr is available.
3.1.3
On the MPC750/MPC7400/MPC7450 microprocessors, using static branch prediction (clearing
HID0[BHT]) means that the hint bit in the branch opcode predicts the branch and the dynamic predictor (the
BHT) is ignored.
In general, dynamic branch prediction is likely to outperform static branch prediction for several reasons.
With static branch prediction, the compiler may have guessed wrongly about a particular branch. With
dynamic branch prediction, the hardware can detect the branch’s dominant behavior after a few executions
and predict it properly in the future. Dynamic branch prediction can also adapt its prediction for a branch
whose behavior changes over time from mostly taken to mostly not taken.
Sometimes static prediction is superior, either through informed guessing or through available
profile-directed feedback. Run-time for code using static prediction is more nearly deterministic, which can
be useful in an embedded system.
22
addic
lwzu (1)
add (1)
bdnz (1)
lwzu (2)
add (2)
bdnz (2)
lwzu (3)
add (3)
bdnz (3)
lwzu (4)
add (4)
bdnz (4)
mtctr
stwu
xor
bne
Instruction
Static Versus Dynamic Prediction Trade-Offs
F2
F2
F2
MPC7450 RISC Microprocessor Family Software Optimization Guide
D
0
BE
D
D
1
I
E
D
2
I
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Table 3-7. Code Loop Example Using CTR
BE
E0
C
D
D
3
E1
D
4
I
I
Go to: www.freescale.com
BE
E2
E0
D
D
5
E1
C
D
E
6
I
I
BE
E2
E0
C
C
D
D
7
BE
E1
C
D
D
D
8
E
I
I
E2
E0
C
C
D
9
I
I
E1
E0
10
C
E
I
E2
11
C
C
E
12
C
E
13
C
C
14
15
E
MOTOROLA
16
C
17
C
C

Related parts for AN2203