CMPSC 64 Lecture Notes - Lecture 10: Stack Overflow, Calling Convention, Memory Address

54 views3 pages
21 Mar 2018
School
Course
Professor

Document Summary

Simultaneously jump to an address and store the location of the next instruction in register jr (jump register) Jump to the address stored in a register, often . We want to be able to call arbitrary functions without knowing the implementation details. Designate specific registers for arguments and return values. If you call a function within a function, you would need multiple copies of. You"d have to copy the value of to another register (or to memory) before calling another function. But what if you run out of registers? i. e. call stacks that are more than 32 functions deep. Store certain information in memory only at certain times. This is where the call stack comes from. By mips conventions, certain registers are designated to be preserved across a call. Preserved registers are saved by the function called e. g. - . Preserved registers are saved by the function called e. g. - e. g. - .

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