The following are some additional pseudoinstructions that on

The following are some additional pseudo-instructions that one could define for MIPS. in each case, supply an equivalent MIPS instruction or sequence of instructions with the desired effect. In partf, mulacc is short for multiply-accumulate. You can assume that the result of (reg1)x(reg2) will fit in a single register. Recall that pseudo-instructions should change no registers except the destination register (if applicable, or PC for branch/jump), but pseudo-instructions may make use of $at for temporary results. BONUS: briefly describe the utility or usefulness of each pseudo-instruction

Solution

parta: beqz $rt, L # if ($rt)=0, goto L :- Here as we can see on the basis of the $rt we are jumping to a memory location L.so the control of the execution will shift from here to L if and only if equal to zero partb: bgzt $rt, L # if ($rt)>0, goto L :- Here as we can see on the basis of the $rt we are jumping to a memory location L.so the control of the execution will shift from here to L if and only if egreater than to zero partc: bgez $rt, L # if ($rt)>=0, goto L :- having this statement we acctually dont need the above two statement so we can see the above two statement are redundant partd: double $rd, $rs # $rd = 2x($rs) here this instruction value will be updated by the next instruction without using the values so we shd have needed a new reg here to work with the value in future parte: triple $rd, $rs # $rd = 3x($rs) partf: mulacc $rd, $rs, $rt # $rd = ($rd)+($rs)x($rt) this is finally making the expression as if 4($rs) * $(rt)
The following are some additional pseudo-instructions that one could define for MIPS. in each case, supply an equivalent MIPS instruction or sequence of instruc

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site