Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The symbol table and the memory map of a segment of MIPS program are shown below right. Also shown are MIPS codes of three
The symbol table and the memory map of a segment of MIPS program are shown below right. Also shown are MIPS codes of three functions F0, F1, and F2. Consider the MIPS program below. As instructions are executed in the given sequence successively, write the value stored in $a0 when the program retums from each jalr instruction below. Symbol Value QO 8382E2 Ox10010000 QI 0x1001000c Q2 0x10010018 FO 0x00400000 Fl 0x00400008 F2 0x00400010 la Ss1, Q2 lw Ss2, ($s1) Address Value jalr Sv1, $s2 0x10010000 0x00400008 $a0= Ox10010004 0x1001000c = 0x10010008 0x10010018 0x1001000c 0x00400000 lw lw 33 $s1, 8($s1) Ox10010010 Ox10010000 Ss2, (Ss1) Ox10010014 Ox10010018 jalr Sv1, $s2 Ox10010018 0x00400010 $a0= = 0x1001001c Ox10010018 Ox10010020 Ox10010000 lw Ss1, 8(Ssl) lw Ss2, (Ss1) FO: li $a0, 0 jalr Sv1, $s2 jr $v1 $a0= F1: li $a0, 1 jr $v1 F2: li $a0, 2 jr $v1
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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