Question: The following three problems in this Exercise refer to this function, written in MIPS assembly following the calling conventions from Figure 2.14: Figure 2.14 At
The following three problems in this Exercise refer to this function, written in MIPS assembly following the calling conventions from Figure 2.14:
Figure 2.14
At the point where this function is called register $a0, $a1, $a2, and $a3 have values 1, 100, 1000, and 30, respectively. What is the value returned by this function? If another function g is called from f, assume that the value returned from g is always 500.
a. f: add bnez sub L: jr b. f: add slt move beqz jr L: move $v0, $al, $a0 $a2, L $v0, $a0, $al $v0 $a2, $a3, $a2 $a2, $a2, $a0 $v0, $al $a2, L $ra $a0,$al jal g : Tail call
Step by Step Solution
3.37 Rating (147 Votes )
There are 3 Steps involved in it
Based on the provided MIPS assembly code and the register values at the point when the function is c... View full answer
Get step-by-step solutions from verified subject matter experts
