avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] Using register r0 and r1


From: Eric Weddington
Subject: RE: [avr-gcc-list] Using register r0 and r1
Date: Tue, 12 Sep 2006 15:16:04 -0600

 

> -----Original Message-----
> From: 
> address@hidden 
> [mailto:address@hidden
> org] On Behalf Of Ram Kumar Rengaswamy
> Sent: Tuesday, September 12, 2006 3:13 PM
> To: address@hidden
> Subject: [avr-gcc-list] Using register r0 and r1
> 
> Hi,
>       I am using registers r0 and r1 in a custom assembly routine  
> within a large C application.
> I save and restore r0 and r1 at the beginning and end of my routine.
> I have a lot of interrupts in my application. Do the interrupts save  
> and restore r0 and r1 as well (if they use them ?).
> Also I read that r1 is assumed to be zero by all C code. Do the  
> interrupt handlers explicitly save and clear r1 prior to using them ?

Rather than chase down all the answers to your questions, would it be easier
to change your routine to use, say r2 and r3 instead?

Eric





reply via email to

[Prev in Thread] Current Thread [Next in Thread]