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 This

The following three problems in this Exercise refer to this function, written in MIPS assembly following the calling conventions from Figure 2.14: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,

Figure 2.14Name Register number $zero $v0-$v1 $a0-$a3 $t0-$t7 $50-$s7 $t8-$t9 $gp $sp $fp $ra 0 2-3 4-7 8-15 16-23 24-25

This code contains a mistake that violates the MIPS calling convention. What is this mistake and how should it be fixed?

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.45 Rating (142 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Based on the given MIPS assembly code snippets and the register usage table we can identify the mistake and suggest how it can be fixed The MIPS calli... View full answer

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 Computer Organization Design Questions!