Are these following MIPS translations from C equivalent? if not, Please explain in detail. My professor said Version one is correct. if i wrote the instruction like version two, I would not get the mark even if they produce same output. she did not explain why. Thank you in advance !
C Code
if (i==j) {
f = g + h ;
}
else
f = g -h ;
MIPS version one :
bne $s3, $s4, Else
add $s0, $s1, $s2
j Exit
Else: sub $s0, $s1, $s2
Exit:...
MIPS version two:
beq $s3, $s4, Else
sub $s0, $s1, $s2
j Exit
Else: add $s0, $s1, $s2
Exit:...