Question: Consider a function foo in the standard x86 calling convention, including the use of a frame pointer, that: Has threeo integer arguments, Calls another a

Consider a function foo in the standard x86 calling convention, including the use of a frame pointer, that: Has threeo integer arguments,

Calls another a function bar with two integer arguments,

Has 3 local variables: an integer and two character pointers, and

Uses only the registers %ebx and %ecx

a. What items will be stored in the activation record for this function, ignoring alignment requirements and return addresses?

b. What actions would the function foo have to perform prior to calling the function bar?

c. What specific instruction would the function foo use to put its third argument into register %ebx?

d. How will the function foo access the return value of function bar once that function returns?

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!