Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] {To TomW} GCC-Bug in IRQs

2006-03-26 by Sten

Robert Adsett wrote:
> 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).
> 


Ok, this makes sense...

  Sten

-- 
/************************************************
 Do you need a tiny and efficient real time
 operating system (RTOS) with a preemtive
 multitasking for LPC2000 or AT91SAM7?

   http://nanortos.net-attack.de/

 Or some open-source tools and code for LPC2000?

   http://www.net-attack.de/

************************************************/

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.