Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The following is a sequence of LEGv8 instructions. (a) Complete the table. Each row of the table should contain the state of the registers immediately

The following is a sequence of LEGv8 instructions.
(a) Complete the table. Each row of the table should contain the state of the registers
immediately after the instruction at the code line is completed. Stop after reaching
R.
Leave table entries blank until the first time a register is initialized/used.
Only make entries in the table when updating one of the four registers tracked (SP,
LR, X0, X7).
Assume in the beginning of the run (line J) the value of register SP is M.
(b) What does this procedure do?
image text in transcribed
image text in transcribed
J: J+4: R: ADDI XO, XZR, #2 BLP # some more code ... P: SUBI SP, SP, #16 P+4: STUR LR, [SP, #8] P+8: STUR XO, [SP, #0] P+12: SUBIS XZR, XO, , #2 P+16: B.GE L T: T+4: T+8: ADDI X7, XZR, #1 ADDI SP, SP, #16 BR LR L: L+4: SUB XO, XO, #1 BL P S: LDUR XO, [SP, #O] S+4: LDUR LR, [SP, #8] S+8: ADDI SP, SP, #16 S+12: MUL X7, X7, X0 S+16: BR LR PC SP LR XO X7

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Foundations Technology Fundamentals For IT Success

Authors: Bob Bryla

1st Edition

0782143725, 9780782143720

More Books

Students also viewed these Databases questions