Question: MIPS: Assume that method JACK executes the following subroutine call: lw $a0, X lw $a1, Y lw $a2, Z addi $sp, $sp, -4 sw $ra,

MIPS:

Assume that method JACK executes the following subroutine call:

lw $a0, X lw $a1, Y lw $a2, Z addi $sp, $sp, -4 sw $ra, 0($sp) jal JILL lw $ra, 0($sp) addi $sp, $sp, 4 sw $v0, RESULT

Method JILL makes thousands of method calls, none of which change registers $a0, $a1, or $a2. JILL uses all ten of the temporary registers ($t0 through $t9), saved registers $s0 and $s1, and a local array of 25 integer values. In addition, JILL returns an integer value via register $v0. Write the code that correctly follows the use conventions to create the stack frame (process control block, activation record) for JILL, and draw a picture of the stack frame immediately after it has been created. NOTE: Be sure you correctly use the frame pointer register!

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!