Question: 2. Q2 (25 points) Consider the MIPS code given in the following. addi Ssp, Ssp, -4 sw Sra, 0(Ssp) addi Sao, $0, 2 addi Sal,
2. Q2 (25 points) Consider the MIPS code given in the following. addi Ssp, Ssp, -4 sw Sra, 0(Ssp) addi Sao, $0, 2 addi Sal, $0, 3 sw Sal, 8(s1) jal dofsumm sw SvO, 16(Ss1) lw Sra, 0(Ssp) addi Ssp, Ssp, 4 jr Sra dofsum: jal sum add Svo, Sa0, Sal jr Sra Draw the snapshot of the stack before, during, and after dofsum() function call. As- sume SSP = 0x45fff00 before dofsum() function call. 6 2. Q2 (25 points) Consider the MIPS code given in the following. addi Ssp, Ssp, -4 sw Sra, 0(Ssp) addi Sao, $0, 2 addi Sal, $0, 3 sw Sal, 8(s1) jal dofsumm sw SvO, 16(Ss1) lw Sra, 0(Ssp) addi Ssp, Ssp, 4 jr Sra dofsum: jal sum add Svo, Sa0, Sal jr Sra Draw the snapshot of the stack before, during, and after dofsum() function call. As- sume SSP = 0x45fff00 before dofsum() function call. 6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
