Question: You are writing a MIPS function named 'foo' which uses registers $ s O and $s 1 for temporary storage. It may also call other

You are writing a MIPS function named 'foo' which uses registers $sO and $s1 for temporary storage. It may also call other functions. Only the beginning of the function is shown. Show the last 5 instructions of the function (at label done) in the edit box below. These instructions should load registers from the stack, and return to the calling function. They should agree with what is shown.
######## Begin function foo
foo:
\table[[addi,$sp,$sp,-12,# increment stack pointer],[sw,$ra,0($sp),# save regs on stack],[sw,$s0,4($sp),],[sw,$s1,8($sp),]]
## Statements in the function foo (not shown)
done:
# load registers from stack, and
# return to calling function
############ End function foo
 You are writing a MIPS function named 'foo' which uses registers

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!