Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The following snippet of assembly includes control hazards: BEGIN LSR R 2 , R 3 , # 4 SUB R 1 , R 1 ,
The following snippet of assembly includes control hazards:
BEGIN
LSR R R #
SUB R R R
B END
LSL R R #
ADD R R R
END
AND R R R
ADD R R R
MOV R #
B BEGIN
LDR RR #
LSL R #
ORR R R R
MOV R R
a Indicate which instructions will need to be flushed for the B END and B BEGIN
instructions, and what the next instruction executed will be Assume that this code is run
on the stage processor discussed in class. Assume no forwarding, and the register file
is written to on the falling edge. Assume that there is no early branch target resolution.
Assume there is code above and below the provided code. Each part of this question is
independent from the other parts.
b Repeat part a but this time, assume we have implemented the logic to support early
branch resolution.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started