At 12:04 AM 3/26/2006 +0100, Sten wrote: >Wonderful! ;-) >But why to save r0..r3 and ip in your irq_isr?!? Only lr will be changed >by bl and registers used by >irq_handler() should be saved in its function prologue by irq_handler() >itself! According to the APCS "A (called)subroutine must preserve the contents of the registers r4-r8, r10, r11 and SP ". R0-R3 are temporary/parameter registers and must be saved by the caller if needed R12 is the intra-procedure call scratch register so similar restrictions apply to it, R14 is the link register so make sure you've saved it properly or you won't be able to return. That leaves R9 the platform specific register, which I believe gcc treats the same as r4-r8 (I can't lay my hands on my reference for that at the moment). Robert " 'Freedom' has no meaning of itself. There are always restrictions, be they legal, genetic, or physical. If you don't believe me, try to chew a radio signal. " -- Kelvin Throop, III http://www.aeolusdevelopment.com/
Message
Re: [lpc2000] {To TomW} GCC-Bug in IRQs
2006-03-25 by Robert Adsett
Attachments
- No local attachments were found for this message.