Question

Translate the following C code to MIPS assembly code. Use a minimum number of instructions. Register...

Translate the following C code to MIPS assembly code. Use a minimum number of instructions.

Register allocations

- i $s0

- j $s1

- base of A[] $s2

- base of B[] $s3

2)

A[3] = B[i] + B[j];

3)

i = 0;

while (j != A[i]) {

i++;

}

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Li to; 12 SiL sti, $50, 2 sl st2, 4s1, 2 Libet aded tt, $t, $s3 add dt, sto, s3 Lw 9u, 0CED Lw stz, ecdt adel tt, Sty tt2 ade*****************************************************************************
PLEASE DO UPVOTE IF THE ANSWER IS HELPFUL AS IT GIVES THE CONFIDENCE TO HELP MORE STUDENTS
*****************************************************************************
Chegg allows me to answer specific no of questions including the sub parts , so please do post the rest of the questions as a separate query as per Chegg Guidelines. Thank you :)
*****************************************************************************

Add a comment
Know the answer?
Add Answer to:
Translate the following C code to MIPS assembly code. Use a minimum number of instructions. Register...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT