Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For the following snippets of assembly, determine the type of the hazard ( s ) , which instruction ( s ) , and which register

For the following snippets of assembly, determine the type of the hazard(s), which instruction(s),
and which register(s) it occurs for. Assume the forwarding logic has been implemented, and the
branch misprediction penalty is 4 cycles. Assume there is code above and below the provided
code. Each part of this question is independent from the other parts.
Example:
AND R3, R5, R7
ADD R6, R3, R7// Data Hazard, R3(Read after Write)
a. ADD R1, R2, R3
SUB R8, R1, R2
AND R3, R3, R2
b. ADD R1, R2, R3
STR R1,[R2, #0]
SUB R2, R1, R2
LDR R3,[R2, #0]
c. LSL R1, R3, #2
ADD R1, R1, R4
B END
LSL R1, R4, #2
ADD R1, R2, R5
END
d.[For this question, Let R1=0, R2=7, R4=3]
START
ADD R3, R2, R4
AND R4, R2, R4
CMP R3, R4
BLT START
SUB R0, R4, R3
STR R0,[R2, #8]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 2 Lncs 13427

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124251, 978-3031124259

More Books

Students also viewed these Databases questions