Question: This MIPS/SPIM program includes a subroutine called myadd that performs x = (y + z); In the space below, replace the myadd subroutine with one

This MIPS/SPIM program includes a subroutine called myadd that performs x = (y + z); In the space below, replace the myadd subroutine with one named myxor that will make x have the value it would get if C code like x = (y^z); were executed, i.e., the result of eXclusive ORing y and z. You should test your routine using SPIM before you submit it, which will require merging it with a test framework like the one used in this MIPSLSPIM program -- but only submit the m routine here. Remember that you can and myxor should comment your code, especially if there are any known bugs. Half off for documented bugs.:-) #### # # Addition routine # # x = y + z # .text .globl myadd my add: leftarrow $s0, y #t0 = y lw $t0,0($t0) la $t1, z # t1 = z addu $t 2, $t0, $t1. #t2 = y + z la $t0, x #x = t2 SW $t2,0($t0) jr $ra #return
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
