CMPSC 64 Chapter Notes - Chapter A: Call Stack, Spim, Data Segment

58 views4 pages
21 Mar 2018
School
Course
Professor

Document Summary

Register use = procedure call conventions = a software governing the use of registers by procedures. Register sh always contains the hardwired value 0. Registers (1), (26), and (27) are reserved for the assembler and operating systems and should not be used by user programs or compilers. Registers - (4-7) are used to pass the first four arguments to routines (remaining arguments are passed on the stack) Registers and (2, 3) are used to return values from functions. Registers - (18-15, 24, 25) are caller-saved registers that are used to hold temporary quantities that need not be preserved across calls. Caller-saved register = a register saved by the routine being called. Registers - (16-23) are callee-saved registers that hold long-lived values that should be preserved across calls. Callee=saved register = a register saved by the routine making a procedure call.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents