Consider the instruction sequence in a five?stage pipeline IF, OF, E, M, OS:

1. ADD r0,r1,r2
2. ADD r3,r0,r5
3. STR r6,[r7]
4. LDR r8,[r7]
Instructions 1 and 2 will create a RAW hazard. What about instructions 3 and 4? Will they also create a RAW
hazard?

Yes ? possibly. Register r6 may not have been stored before it is read (in memory) by the next instruction. Of
course, part of the problem is the bad code. You are storing a value in memory and then reading it back. You
should replace the LDR r8,[r7] by MOV r8,r6.

Computer Science & Information Technology

You might also like to view...

Each memory location in RAM has a unique ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

In ____, the ribbon increases in height, the buttons are bigger, and more space appears around each button so you can more easily use your finger or a stylus to tap the button you need.

A. Touch Mode B. Click Mode C. Tap Mode D. Normal Mode

Computer Science & Information Technology