Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
The table on the right is declared in the data segment of a MIPS program. A segment of MIPS codes in the text segment is
The table on the right is declared in the data segment of a MIPS program. A segment of MIPS codes in the text segment is shown below. Recall that an instruction 'jalr' is identical to 'jal $s2' (namely, the target address is in Ss2) except that the return address is saved in $v1 instead of $ra. Either FUNO or FUN1 is a function that simply returns upon a call. 00: .word FUNO word Q1 word Q0 Q1: .word FUN1 word Q0 word Q1 When 'b rept' instruction is executed for the first time, what values will be in Ssl and Ss2 aftef 'b rept completes its execution? a. la 1, Q0 Ss1 Ss2 $s0, 1 rept: Iw $s2, (Ss1) ar v1, $s2 b. When b repr instruction is executed for the second time, what values will be in $s1 and Ss2 after its completion? sil $s0, $s0, 2 add $s1, $s1, $s0 w $s1, ($s1) sra s0, $s0, 2 Ss1 Ss2 re FUNO: Jr SV1 FUN1: Jr SV1 The table on the right is declared in the data segment of a MIPS program. A segment of MIPS codes in the text segment is shown below. Recall that an instruction 'jalr' is identical to 'jal $s2' (namely, the target address is in Ss2) except that the return address is saved in $v1 instead of $ra. Either FUNO or FUN1 is a function that simply returns upon a call. 00: .word FUNO word Q1 word Q0 Q1: .word FUN1 word Q0 word Q1 When 'b rept' instruction is executed for the first time, what values will be in Ssl and Ss2 aftef 'b rept completes its execution? a. la 1, Q0 Ss1 Ss2 $s0, 1 rept: Iw $s2, (Ss1) ar v1, $s2 b. When b repr instruction is executed for the second time, what values will be in $s1 and Ss2 after its completion? sil $s0, $s0, 2 add $s1, $s1, $s0 w $s1, ($s1) sra s0, $s0, 2 Ss1 Ss2 re FUNO: Jr SV1 FUN1: Jr SV1
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started