{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lecture5 - Announcements Reminder submit questions to...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
2/7/2008 1 1 ECE/CS 314 Announcements Reminder: submit questions to newsgroup FIRST (or ask in Section or TA/Consulting hours) IMPORTANT: read newsgroup before you post! Projects must be in groups of two No partner? Come up to front of class at end Remember that 5% Flexgrade 2 ECE/CS 314 Announcements Consulting hours are – Sunday 7:00pm-9:00pm – Monday 8:00pm-10:00pm – Tuesday 7:00pm-9:00pm Wednesday 8:00pm-10:00pm Thursday 7:00pm-9:00pm Consultants are available in the P329 lab THIS SUNDAY ONLY – Consulting hours will be 1:00pm-3:00pm 3 ECE/CS 314 Hennessy and Patterson Read Chapter 2 2.1 through 2.9 plus 3.1, 3.2 (DONE) 2.10 through 2.15 plus 2.17 (DONE) Read Chapter 3 and 4 3.3-3.6 and 3.8-3.9 (DONE) 4.1-4.6 for next Tuesday Read supplemental docs we give you “Notes on Programming in C” “MIPS Calling Convention” (DONE [or you’re dead]) Read CD “For More Practice” for Chapters 2 & 3 (2.20 & 3.11) good for prelim study Read Appendix A.10 (DONE) Read Appendix A.1-A-5 for today 4 ECE/CS 314 Procedures, Recap • A stack frame holds information about each procedure call – Each call pushes a new stack frame onto the stack – Each return pops the stack frame off the stack This information may include local data, return address, saved variables, and arguments Registers used by procedure calls/returns are $a0,$a1,$a2,$a3,$ra, and $sp Stack frames must always be double word aligned
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2/7/2008 2 5 ECE/CS 314 Our Stack Frames Top of stack 6 ECE/CS 314 Local Data Section • You must include a Local Data Section in the stack frame for a procedure if: – The procedure requires more storage than can fit in available registers The Local Data Section must always be – Double word aligned – Have a size that is a multiple of 8 7 ECE/CS 314 Return Address Slot • You must include a Return Address Slot in the stack frame for a procedure if: – The procedure calls another procedure (i.e., is a non- leaf procedure)
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}