Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following x86-64 assembly code foo: mov $0x123, (%rax) mov $0x345, (%rcx) mova $0x456,%rax movm $0x567, (RESA) mov $0x678, %rdi call bar pusha %r8

image text in transcribedimage text in transcribed

Consider the following x86-64 assembly code foo: mov $0x123, (%rax) mov $0x345, (%rcx) mova $0x456,%rax movm $0x567, (RESA) mov $0x678, %rdi call bar pusha %r8 .checkpoint: Just before the section starting from foo is executed, the register values are given in the table: Value 0x123456789A 0x123456789B 0x123456789C 0x123456789D 0x123456789E 0x123456789F 0x12345678A0 0x12345678A1 Register Value 0x987654320A 0x987654320B 0x987654320C 0x987654320D 0x987654320E 0x987654320F 0x9876543210 0x9876543211 Register %r8 %r10 %r11 %r12 %r13 %r14 %r15 %rdi Assume "bar" is a well written function, following the calling convention you have seen in class. Also assume that there were no errors during execution (segmentation fault, etc.) What will be the values in the registers when the code reaches "checkpoint"? (Put values if a register will CERTAINLY have that value. Otherwise, write "UNKNOWN". Remember, bar can be any function, but it follows the calling conventions correctly.)

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_2

Step: 3

blur-text-image_3

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 Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

9th Edition

0135188148, 978-0135188149, 9781642087611

More Books

Students also viewed these Databases questions

Question

What are the other economic side effects of accidents?

Answered: 1 week ago