Question: 1. Consider the following MIPS code (don't worry about what it does): loop: beq $s0, $s1, done addi $t0,$t0, 7 addi $t1, $t2, 4

 1. Consider the following MIPS code (don't worry about what it does):  

1. Consider the following MIPS code (don't worry about what it does): loop: beq $s0, $s1, done addi $t0,$t0, 7 addi $t1, $t2, 4 addi $50, $s0, 1 j loop done: beq $t1, $t5, skip addi $t0, $t0, 1 add $t1,$t2, $t0 addi $15, $0, 10 beq $t1,$t5, done jend a. Compute the branch offset for each beq in number of words away from the branch (e.g., "branch offset is 2"). b. Assume label loop is at location Ox00114214 and label end is at location Ox00032794. Compute the correct value to place in the jump address field for each jump instruction in the MIPS code above. skip

Step by Step Solution

3.32 Rating (146 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To compute the branch offset for each beq instruction we count the number of instructions between th... 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 Programming Questions!