Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are given the following code. Note that floating - point instructions use floating point registers labeled f . Integer instructions use integer registers labeled

You are given the following code. Note that floating-point instructions use floating point registers labeled f. Integer instructions use integer registers labeled x. Remember that the first operand is the destination. The memory address referenced in fld and fsd are obtained by adding the displacement to the value in the index register.
loop: fld f0,0(x1)
fld f2,0(x2)
fadd f6,f2,f12
fsub f4,f0,f10
fmul f8, f4, f6
fsd f8,0(x2)
subi x1, x1,8
subi x2,x2,8
bnz x1, loop
We are given the following latencies for the different types of instructions.
Floating Point Add/Sub -3
Floating point Multiply -5
Load/Store -2
Integer arithmetic -1
Branch if not taken -1
Branch if taken -2
a). Show how many cycles are needed to complete one iteration without reordering. DO NOT use delayed branch.
b). Reorder instructions and show how many cycles are needed to complete one iteration. BE CAREFUL
TO ADJUST OFFSETS WITH fsd WHEN YOU REORDER INSTRUCTIONS.

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

Data Management Databases And Organizations

Authors: Richard T. Watson

2nd Edition

0471180742, 978-0471180746

More Books

Students also viewed these Databases questions

Question

Why is the Japanese electronics industry no longer a success story?

Answered: 1 week ago