CMPSC 64 Lecture Notes - Lecture 10: Stack Overflow, Calling Convention, Memory Address
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. - .