Question: Main routine M1 calls a procedure P1 (The return address is a value RM. Assume the initial stack pointer has a 32 bit value of

Main routine M1 calls a procedure P1 (The return address is a value RM. Assume the initial stack pointer has a 32 bit value of 0x0700C. Procedure P1 will be using $s0, $s1, $s2 and need to be saved on the stack. RM (which is in $ra) need to be saved on the stack (since there is a call to another procedure). In P1, there is a call of procedure P2 (return address is a value RP1). Procedure P2 is likely to use $s4, $s5 (and hence need to be saved on stack). Show the SP value right after $s5 is saved. Also, show the stack contents (updated in this sequence).

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!