Question
Use the following assembly code to answer the questions below, assuming that: X19 = f, X20 = g, X21 = i, X22 = &a LDUR
Use the following assembly code to answer the questions below, assuming that:
X19 = f, X20 = g, X21 = i, X22 = &a
LDUR X19, [X22, #0]
LDUR X20, [X22, #8]
ADDI X21, XZR, #0
LOOP: SUB X9, X19, X20
CBZ ENDLOOP
ADDI X19, X19, #1
ADDI X21, X21, #1
B LOOP
ENDLOOP: STUR X21, [X22, #16]
a.What value would the assembler insert for ENDLOOP in the CBZ instruction?
b. What value would the assembler insert for LOOP in the B instruction?
c.If a[0] = 5 and a[1] = 8, what value will be stored in a[2]?
d. How many R, D, I, B, and CBZ instructions are executed if a[0] = 5 and a[1] = 8?
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