Contents    Page-10    Prev    Next    Page+10    Index   

Function Calls

For external functions, it is necessary to:

  1. Set up the arguments for the function call.

  2. Call the function.

  3. Retrieve the result and do any necessary final actions.

A function call involves the following:

  1. Load arguments into registers:

  2. Execute a call instruction[PLT is the Procedure Linkage Table for dynamically linked procedures.]:

       call   sin@PLT

  3. Floating results are returned in %xmm0. Integer results are returned in %eax or %rax.