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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started