Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 4 : Performance & Pipelining ( 2 5 points ) Given an integer array A in memory with the base address stored in register

Problem 4: Performance & Pipelining (25 points)
Given an integer array A in memory with the base address stored in register $s1, the following
MIPS code is executed. Register $s0 contains the variable b. Assume that register $s2 is used for
output. The content of array A is {0,1,5,7,9,11,6,3,7,2} where A[0]?=0 and A[9]=2. The
variable b=5.
addi $t0,$s1,20
1oop: 1w $t1,0($t0)
beg $t1,$s0, L1
addi $t0,$t0,-4
bne $t0,$s1,100 p
L1: add $s2, $zero, $zero
beg $t0,$s1, exit
addi. $ s2, $zero, 1
exit:
a)[6 points] Describe in one sentence what this code does.
b)[3 points] What is the final value in $s2?
c) points
image text in transcribed

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_2

Step: 3

blur-text-image_3

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

AWS Certified Database Study Guide Specialty DBS-C01 Exam

Authors: Matheus Arrais, Rene Martinez Bravet, Leonardo Ciccone, Angie Nobre Cocharero, Erika Kurauchi, Hugo Rozestraten

1st Edition

1119778956, 978-1119778950

More Books

Students also viewed these Databases questions

Question

How do you try to manipulate your unique smell?

Answered: 1 week ago