Question: C++!!! Page 4: Assembly 10. 13 points] Consider the x86-64 assembly below and recall that in the Linux x86-64 calling convention: the first argument is

C++!!!C++!!! Page 4: Assembly 10. 13 points] Consider the x86-64 assembly below

Page 4: Assembly 10. 13 points] Consider the x86-64 assembly below and recall that in the Linux x86-64 calling convention: the first argument is in RDI, the second argument is in RSI, the return value is in RAX Write Cr+ code equivalent to the assembly function foo above: (A valid prototype is provided for you.) extern "C" long foo (long *a, long i) foo /Inotice there isn 't much space I/You can do this in one line of code mov RAX, [RDI RSI 8] mov RAX, RDI RAX 8] ret

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!