Question: Consider the MIPS assembly code below. func1, func2, and func3 are non-leaf functions. func4 is a leaf function. The code is not shown for each
Consider the MIPS assembly code below. func1, func2, and func3 are non-leaf functions. func4 is a leaf function. The code is not shown for each function, but the comments indicate which registers are used within each function.?

(a) How many words are the stack frames of each function?(b) Sketch the stack after func4 is called. Clearly indicate which registers are stored where on the stack and mark each of the stack frames. Give values where possible.
Ox00401000 funcl : .. # funcl uses $s0-$s1 Ox00401020 jal func2 Ox00401100 Ox0040117C func2: # func2 uses $s2-$s7 jal func3 Ox00401400 func3: # func3 uses $s1-$s3 Ox00401704 jal func4 # func4 uses no preserved # registers Ox00403008 func4: Ox00403118 jr $ra
Step by Step Solution
3.35 Rating (167 Votes )
There are 3 Steps involved in it
a The stack frames of each procedure are proc1 3 words deep ... View full answer
Get step-by-step solutions from verified subject matter experts
