Menu

(Solved) : 471 Functions Assembly Jump Level 1 Convert C Assembly Using Program Stack Int Calcfunc In Q44094585 . . .

I need help with the following code. Options include add, addi,jr, lw, sub, sw.

4.7.1: Functions in assembly. Jump to level 1 Convert the C to assembly using the program stack. int CalcFunc(int aVal, int b

4.7.1: Functions in assembly. Jump to level 1 Convert the C to assembly using the program stack. int CalcFunc(int aVal, int bVal) { return (aval – 4) + bval; Data memory 8176 8180 2 8184 3 CalcFunc: lw $t0 , 0 $sp ) lw $t1 , 0 ($sp ) addi , $t3 Szero 4 add $t2 , $t2 $t2 add $t2 * $t21$t21 – 1W $t2 1 0 $sp ) jr Sra Registers Szero Stoo $t10 S120 sto 8176 Sra 160 Show transcribed image text 4.7.1: Functions in assembly. Jump to level 1 Convert the C to assembly using the program stack. int CalcFunc(int aVal, int bVal) { return (aval – 4) + bval; Data memory 8176 8180 2 8184 3 CalcFunc: lw $t0 , 0 $sp ) lw $t1 , 0 ($sp ) addi , $t3 Szero 4 add $t2 , $t2 $t2 add $t2 * $t21$t21 – 1W $t2 1 0 $sp ) jr Sra Registers Szero Stoo $t10 S120 sto 8176 Sra 160

Expert Answer


Answer to 4.7.1: Functions in assembly. Jump to level 1 Convert the C to assembly using the program stack. int CalcFunc(int aVal, …

OR