Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

7) For the following three pseudoinstructions, produce a minimal sequence of act

ID: 3752960 • Letter: 7

Question

7) For the following three pseudoinstructions, produce a minimal sequence of actual MIPS instructions (refer to the attachment) to accomplish the same thing. You may need to use Sat (S1) for some of the sequences. Note: big refers to a specific number that requires 32 bits to represent and small to a number that can fit in 16 bits. Pseudoinstructions What it accomplishes Actual MIPS instructions beq St1, small, L ble $t3, $15, L 1w $15, big(St2) If (Stl small) addi Sat, Szero, small beg Stl, Sat, I go to L | If ($t3

Explanation / Answer

Answer is as follows :

b) ble $t3,$t5,L

stl $at, $t3,$t5 // check if $t4 < $t5, if yes than set $at = 1 else 0

beq $at, $zero, L // if not less than than check if $t is 0, if yes go to L else terminate.

c) lw $t5, big($t2) , load the value present at location $t2 + big at $t5

addi $at , $t2 , big // add the value of $t2 and big and store value at $at

mov $t5,$at // move value of $at to $t5.

if there is any query please ask in comments...

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote