Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PROBLEM 3 (15 POINTS) A (10 points) Translate these two LEGv8 assembly instructions to 32-bit binary machine code. Give your answer in hexadecimal. CBZ X19,

PROBLEM 3 (15 POINTS)

A (10 points) Translate these two LEGv8 assembly instructions to 32-bit binary machine code. Give your answer in hexadecimal.

CBZ X19, exit

ADD X10, X19, X20

exit:

Instruction 1:

0x ____________________

Instruction 2:

0x___________________

B (5 points)

Consider the following code fragment for answering the following questions. Assuming the label func located at 0x400040.

func: SUBI SP, SP, #16

STUR X19, [SP,#0]

ADD X19,XZR, XZR

loop: SUBI X0, X0, #1

CBZ X0, else

ADDI X19, X19, #3

B loop

else: ADDI X0, X19, #0

LDUR X30, [SP, #0]

BR LR

For the following LEGv8 fragment find the BR address field for B (26 bits) and immediate field for CBZ instructions (19 bits). Use binary representation

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

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions