Show what additional MIPS instructions must be generated inside
the function I in order to implement the if-then-else.
More specifically, show exactly what MIPS instructions and/or
labels would need to be inserted by the I
function at the three places below labeled
# INSERT ...
# Start of code for an if-then-else
# INSERT EXTRA LABEL(S) AND/OR INSTRUCTION(S) HERE
# Start of if-then-else (no MIPS code needed here)
# Start of code to evaluate an expression E
...
# Result left in a temporary memory location 144 bytes past
# the start of the memory array M.
# INSERT EXTRA LABEL(S) AND/OR INSTRUCTION(S) HERE
lw $t1, 144($s1)
beq $t1, $zero, ThenEnd4
# Start of code to evaluate the first portion { S }
...
# INSERT EXTRA LABEL(S) AND/OR INSTRUCTION(S) HERE
j ElseEnd4
ThenEnd4:
# Start of code to evaluate the second portion {S}
...
# INSERT EXTRA LABEL(S) AND/OR INSTRUCTION(S) HERE
ElseEnd4:
(Note that there must be a sequence number, like the
4 above, that will distinguish this if-then-else from any other.)