Consider the following Tiger code that gets converted to its…
Consider the following Tiger code that gets converted to its MIPS assembly: function main() begin let var a, i : int := 0; var b : int := 1; begin a := a + b; while (i < 10) do a := a + b; if (i < 5) then a := a + b; else a := a - b; endif; a := a + b; i := i + 1; enddo; printi(a); end end main: addi $sp, $sp, __ li $t1, 0 li $s2, 0 li $t0, __ add $s2, $s2, $t0_L0: li $t8, __ bge $t1, $t8, __ add $s2, $s2, $t0 li $t8, 5 bge $t1, $t8, _L2 add $s2, $s2, $t0 j ___L2: sub $s2, $s2, $t0_L3: add $s2, $s2, $t0 addi __, __, 1 j ___L1: move $a0, $s2 li $v0, 1 syscall li $a0, 10 li $v0, 11 syscall addiu $sp, $sp, 40 jr $ra The MIPS assembly for the above code has some parts replaced with underline blanks. What values, temporary variables or labels need to be in these blanks?
Read Details