What is the first value pushed in the stack?

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
What is the first value pushed in the stack?
Procedure "Srch"
PC
Instruction
40 Srch:
addi sp, sp, -8
44
sd x1, 0(sp)
48
bge x13, x12,
52
addi x10, x0, -1
Procedure Call
Address
Memory Contents
56
beq x0, x0, Exit
PC
Instruction
72 to 79
OX00000000000005F3
60 L1:
slli x5, x12, 3
addi x11, x0, 0
64 to 71
OXFFFFFFFFFFFFF900
64
add x5, x5, x11
4 addi x12, xO, 0
56 to 63
OX00000000000001EB
68
Id x5, 0(x5)
8.
addi x13, x0, 9
48 to 55
OXFFFFFFFFFFFFFC79
72
bne x5, x14, L2
12 addi x14, x0, Ox732
40 to 47 OX00000000000004AC
76
add x10, x12, xO
16 jal x1, Srch
32 to 39
OXFFFFFFFFFFFFFA 15
80
beq x0, x0, Exit
24 to 31
OXFFFFFFFFFFFF86D
84 L2:
slli x6, x13, 3
16 to 23
Ox0000000000000732
88
add x6, x6, x11
8 to 15
Ox0000000000000025
92
Id x6, 0(x6)
O to 7
Ox00000000000003B1
96
bne x6, x14, L3
100
add x10, x13, x0
104
beq x0, x0, Exit
108 L3:
addi x12, x12, 1
112
addi x13, x13, -1
116
jal x1, Srch
120 Exit:
Id x1, 0(sp)
addi sp, sp, 8
POWEROUNIT
124
128
jalr x0, 0(x1)
Transcribed Image Text:Procedure "Srch" PC Instruction 40 Srch: addi sp, sp, -8 44 sd x1, 0(sp) 48 bge x13, x12, 52 addi x10, x0, -1 Procedure Call Address Memory Contents 56 beq x0, x0, Exit PC Instruction 72 to 79 OX00000000000005F3 60 L1: slli x5, x12, 3 addi x11, x0, 0 64 to 71 OXFFFFFFFFFFFFF900 64 add x5, x5, x11 4 addi x12, xO, 0 56 to 63 OX00000000000001EB 68 Id x5, 0(x5) 8. addi x13, x0, 9 48 to 55 OXFFFFFFFFFFFFFC79 72 bne x5, x14, L2 12 addi x14, x0, Ox732 40 to 47 OX00000000000004AC 76 add x10, x12, xO 16 jal x1, Srch 32 to 39 OXFFFFFFFFFFFFFA 15 80 beq x0, x0, Exit 24 to 31 OXFFFFFFFFFFFF86D 84 L2: slli x6, x13, 3 16 to 23 Ox0000000000000732 88 add x6, x6, x11 8 to 15 Ox0000000000000025 92 Id x6, 0(x6) O to 7 Ox00000000000003B1 96 bne x6, x14, L3 100 add x10, x13, x0 104 beq x0, x0, Exit 108 L3: addi x12, x12, 1 112 addi x13, x13, -1 116 jal x1, Srch 120 Exit: Id x1, 0(sp) addi sp, sp, 8 POWEROUNIT 124 128 jalr x0, 0(x1)
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY