120 likes | 226 Views
CS232 – Section 3. 7 February 2010. Reminders. Can meet after this section in 0212 SC MP3 is released, due Friday Feb 18, 6:00pm. Questions?. Interrupts. Can happen at any time Can’t prepare for them Patterson/Hennessey – “unscheduled procedure call” Calling conventions don’t apply
E N D
CS232 – Section 3 7 February 2010
Reminders • Can meet after this section in 0212 SC • MP3 is released, due Friday Feb 18, 6:00pm
Interrupts • Can happen at any time • Can’t prepare for them • Patterson/Hennessey – “unscheduled procedure call” • Calling conventions don’t apply • $a[0-3]/$t[0-9], etc… must all be saved
Interrupt Handler • Code located at 0x80000080 • Processor starts executing at that address on interrupt/exception • Can’t clobber any registers
Question 1: Saving registers • In order to preserve registers, the interrupt handler must first save every register it intends to use in memory. Should it use the stack for this?
Question 2: Saving registers to chunkIH • By convention, the registers $k0 and $k1 are used only by the interrupt handler (i.e., the interrupt handler is free to squash these registers without affecting any active programs). What is wrong with the following code to save additional registers to chunkIH?
“la” instruction Source: http://en.wikipedia.org/wiki/MIPS_architecture#Pseudo_instructions
Source: http://pages.cs.wisc.edu/~larus/HP_AppA.pdf (Appendix A of Patterson/Hennessey text)