3. The following program is an example of MIPS PC-relative addressing whore is translated from C++: While (save[i] == k) i = i +j; Loop: add $t1, $s3, $s3 # temp reg $t1 = 2 * i add $t1, $t1, $t1 # temp reg $t1 add $t1, $t1, $s6 # $t1 = address of save[i] # Temp reg $t0 = save[i] %3D lw $t0, 0 ($t1) bne $t0, $s5, Exit # go to Exit if save[i] != k add $s3, $s3, $s4 # i = i +j j Loop # go to Loop Exit: Complete the table below with the values of each instruction in decimal. The first part has been done for you.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
3. The following program is an example of MIPS PC-relative addressing where i
is translated from C++:
While (save[i] == k) i = i + j;
Loop: add $t1, $s3, $s3 # temp reg $t1 = 2 * i
add $t1, $t1, $t1 # temp reg $t1 = 4 * i
add $t1, $t1, $s6 # $tl = address of save[i]
lw $t0, 0 ($t1)
bne $t0, $s5, Exit # go to Exit if save[i] != k
add $s3, $s3, $s4 # i = i +j
j Loop
# Temp reg $t0 = save[i]
# go to Loop
Exit:
Complete the table below with the values of each instruction in decimal. The
first part has been done for you.
Address Instructions
80000
0.
19
19
6.
32
80004
80008
80012
80016
80020
80024
Transcribed Image Text:3. The following program is an example of MIPS PC-relative addressing where i is translated from C++: While (save[i] == k) i = i + j; Loop: add $t1, $s3, $s3 # temp reg $t1 = 2 * i add $t1, $t1, $t1 # temp reg $t1 = 4 * i add $t1, $t1, $s6 # $tl = address of save[i] lw $t0, 0 ($t1) bne $t0, $s5, Exit # go to Exit if save[i] != k add $s3, $s3, $s4 # i = i +j j Loop # Temp reg $t0 = save[i] # go to Loop Exit: Complete the table below with the values of each instruction in decimal. The first part has been done for you. Address Instructions 80000 0. 19 19 6. 32 80004 80008 80012 80016 80020 80024
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY