Question: Problem 1: Performance and MIPS ISA Consider this C/C++ code fragment: 47 , sum-o, x[10]; sum - sum + x[ The code fragment is translated

Problem 1: Performance and MIPS ISA Consider this C/C++ code fragment: 47 , sum-o, x[10]; sum - sum + x[ The code fragment is translated to MIPS assembly language. us allocated to $16. $18 s a pointer for referencing the array x[]; $18 has already been initialized to contain &x[0]. The variable sunm is also allocated in memory; $20 contains &sum The MIPS code: $16, $0, $0 $19,($18) # 1-0 # load x[1] # load sum #sum-sum+x[1] # store sum Or 49ORAJ%. Lw $21, ($20) Add $21,$21,$19 Sw $21, ($20) Addi, $16,$16,1 Addi, $18,$18,4 Slti, $17,$16,10 Ane. $17,$0,loop #if (1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
