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. 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
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