Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The following code is to be executed on a processor with 32 architectural registers. The processor is able to issue instructions out-of-order. The processor is

The following code is to be executed on a processor with 32 architectural registers. The processor is able to issue instructions out-of-order. The processor is a single issue machine. The processor has different functional unit latencies with multiply instructions having a latency of 4 cycles, ALU operations having a latency of 1 cycles, and loads and stores having a latency of 2 cycles. The processor stalls on WAW and WAR dependencies. Pretend that you are the compiler and perform changes to the following code to increase the performance of the code when executing on this out-of-order processor. Assume that all registers not used are free to be used by the compiler.

image text in transcribed

Which of the following code sequences would increase the performance of the code on this OoO processor? Select all that apply.

a)

image text in transcribed

b)

image text in transcribed

c)

image text in transcribed

d)

image text in transcribed

0: MUL R5, R6, R7 1: ADD R8, R5, R6 2: MUL R10, R13, R8 3: SW R12, (R10) 4: SUB R10, R6, R4 5: MUL R17, R10, R15 6: ADDIU R15, R5, 1 MUL RS, R6, R7 ADD R8, RS, R6 MUL R18, R13, R8 SW R12, 0(R18) SUB R10, RO, R4 MUL R17, R10, R15 ADDIU R19, R5, 1 MUL R5, R6, R7 ADD R8, R5, R6 MUL R18, R13, R8 SW R12, 0(R18) SUB R18, R6, R4 MUL R17, R18, R15 ADDIU R15, R5, 1 MUL R5, R6, R7 ADD R8, R5, R6 MUL R10, R13, R8 SW R12, 0(R10) SUB R18, R6, R4 MUL R17, R18, R15 ADDIU R19, R5, 1 MUL R19, R6, R7 ADD R8, R19, RO MUL R10, R13, R8 SW R12, 0(R10) SUB R10, R6, R4 MUL R17, R10, R15 ADDIU R15, R19,1

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

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 2012 Proceedings Part 2 Lnai 7197

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284892, 978-3642284892

More Books

Students also viewed these Databases questions

Question

f. Did they change their names? For what reasons?

Answered: 1 week ago