Question: (b) Consider the following MIPS assembly code and the register assignment table: 1 li $4,1 2 li $3,15 li $2,1 li $1,5 5 label: bgt

 (b) Consider the following MIPS assembly code and the register assignment

(b) Consider the following MIPS assembly code and the register assignment table: 1 li $4,1 2 li $3,15 li $2,1 li $1,5 5 label: bgt $2,$1, exit 6 sub $3,$3, $2 7 mul $4,$4, $3 8 addi $2,$2,1 9 j label 10 exit: con X MIPS Register Java Variable $1 $2 $3 $4 Z w ) Describe the above MIPS code by adding brief comments on each line. [3 marks] (6) Convert the above MIPS code into equivalent Java code. [3 marks] () Write equivalent MIPS code by replacing only the bgt instruction (line 5) with a different branch instruction from the table below. [3 marks] 6

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!