Information Technology Reference
In-Depth Information
I 1
I 2
IS
I 1
I 2
IE
I 1
I 2
OF
I 1
I 2
ID
I 1
I 2
IF
12345 6 7
Figure 9.14 Hardware forwarding
Software Operand Forwarding
Operand forwarding can alternatively be
performed in software by the compiler. In this case, the compiler should be
“smart” enough to make the result(s) of performing some instructions quickly
available, as operand(s), for subsequent instruction(s). This desirable feature
requires the compiler to perform data dependency analysis in order to determine
the operand(s) that can possibly be made available (forwarded) to subsequent
instructions, thus reducing the stall time. This data dependency analysis requires
the recognition of basically three forms. These are explained below using simple
examples.
STORE-FETCH This case represents data dependency in which the result of
an instruction is stored in memory followed by a request for a fetch of the
same result by a subsequent instruction. Consider the following sequence of two
instructions:
Store R 2 ,(R 3 );
M[R 3 ]
R 2
R 4 M[R 3 ]
Load
(R 3 ), R 4 ;
In this sequence, the operand needed by the second instruction (the contents of
memory location whose address is stored in register R 3 ) is already available in
register R 2 and therefore can be immediately (forwarded) moved into register R 4 .
Figure 9.15 Hardware forwarding
Search WWH ::




Custom Search