Question: For the (pseudo) assembly code below, replace X, Y, P, and Q with the smallest set of instructions to save/restore values on the stack and

For the (pseudo) assembly code below, replace X, Y, P, and Q with the smallest set of instructions to save/restore values on the stack and update the stack pointer. Assume that procA and procB were written independently by two different programmers who are following the MIPS guidelines for caller-saved and callee-saved registers. In other words, the two programmers agree on the input arguments and return value of procB, but they can't see the code written by the other person.(50 points) procA: $s0 = ... $s1 = ... $s2 = ... $t0 = ... $t1 = ... $t2 = ... X $a0 = ... $a1 = ... jal procB Y ... = $s1 ... = $t0 ... = $t1 ... = $a0 jr $ra procB: P ... = $a0 ... = $a1 $s2 = ... $t0 = ... Q jr $ra

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!