B Branch Using a Displacement
3-70 Instruction Set SPRU733
Target Instruction
Pipeline
Stage
E1 PS
PW PR DP DC E1
Read
Written
Branch
Taken
Unit in use
.S
Instruction Type Branch
Delay Slots 5
Example Table 3−13 gives the program counter values and actions for the following
code example.
0000 0000 B .S1 LOOP
0000 0004 ADD .L1 A1, A2, A3
0000 0008 || ADD .L2 B1, B2, B3
0000 000C LOOP: MPY .M1X A3, B3, A4
0000 0010 || SUB .D1 A5, A6, A6
0000 0014 MPY .M1 A3, A6, A5
0000 0018 MPY .M1 A6, A7, A8
0000 001C SHR .S1 A4, 15, A4
0000 0020 ADD .D1 A4, A6, A4
Table 3−13. Program Counter Values for Example Branch Using a Displacement
Cycle Program Counter Value Action
Cycle 0 0000 0000h Branch command executes
(target code fetched)
Cycle 1 0000 0004h
Cycle 2 0000 000Ch
Cycle 3 0000 0014h
Cycle 4 0000 0018h
Cycle 5 0000 001Ch
Cycle 6 0000 000Ch Branch target code executes
Cycle 7
0000 0014h
Pipeline