10/6: Lecture Topics

10/6/99


Click here to start


Table of Contents

10/6: Lecture Topics

Calling Conventions

Calling Conventions

A MIPS Calling Convention

Step 1: Parameter Passing

Step 2: Transfer Control

Jump and Link

Step 3: Acquire Storage

Refining Program Layout

Saving Registers on the Stack

Assembly for Saving Registers

Step 4: Do the work

Callee-saved vs. Caller-saved

Step 5: Return values

Step 6: Return control

An Example

Compiling the Example

Nested Procedures

A Trail of Bread Crumbs

Preservation Conventions

A Brainteaser in C

Author: Gretta E. Bartels