Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

translating MIPS to C can some explain how in the comments, line 1 becomes the line2, and how the line 5 becomes line 6 thanks!

translating MIPS to C
can some explain how in the comments, line 1 becomes the line2, and how the line 5 becomes line 6 thanks! image text in transcribed
on the comments to the right of the code, I dont understand how $t0=&A[f] is a result of add $t0, $s6, $t0. Same with $t2=&A[f+1] from addi $t2, $t0, 4
image text in transcribed
= sll $t0, $50, 2 add $t0, $56, $t0 sll $t1, $si, 2 add $ti, $s7, $t1 lw $s0, 0($t0) addi $t2, $t0, 4 lw $t0, 0($t2) add $t0, $t0, $50 sw $t0, 0($t1) # $t0 = f * 4 # $t0 &A[f] # $t1 = g * 4 # $t1 = &B[g] # f = A[f] # $t2 = &A[f+1] # $t0 A[f+1] # $t0 = A[f+1] + A[f] # B[9] = A[f+1] + A[f] = Answer: B[g] = A[f+1] + A[f] 2.4 For the MIPS assembly instructions below, what is the corresponding C statement? Assume that the variables f, g, h, i, and j are assigned to registers $80, $81, $s2, $s3, and $s4, respectively. Assume that the base address of the arrays A and Bare in registers $s6 and $s7, respectively

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

Practical Database Programming With Visual C# .NET

Authors: Ying Bai

1st Edition

0470467274, 978-0470467275

More Books

Students also viewed these Databases questions

Question

Types of cultural maps ?

Answered: 1 week ago

Question

Discuss the various types of leasing.

Answered: 1 week ago

Question

Define the term "Leasing"

Answered: 1 week ago

Question

What do you mean by Dividend ?

Answered: 1 week ago

Question

=+4 Develop and deliver the CCT program.

Answered: 1 week ago