This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ISR-support in ARM


In message <3BF105C8.E4A7451@luukku.com>, Kai Ruottu writes:
> I wrote somehow unclear, but my conclusion was the opposite... I have the
>examples from Atmel for the assembly wrappers and there are quite a lot
>extra things to do like in the prologue :
>
>;- Adjust and save LR_irq mode in IRQ stack
>            sub         r14, r14, #4
>            stmfd       sp!, {r14}
>
>;- Save SPSR and r0 in IRQ stack
>            mrs         r14, SPSR
>            stmfd       sp!, {r0, r14}

None of this stuff is specific to AT91, nor is it strictly necessary.  It all 
depends on what environment you want your ISR to run in.  If you need the 
level of control that means you want to switch processor modes and stuff, you 
should probably be using an assembler veneer rather than trying to persuade 
the compiler to generate this code.

>From a quick look at the output from gcc-3.0 it seems to be doing roughly the 
right thing.  If you think there are bugs, perhaps you could post a testcase 
that illustrates them.

>expect some generic advices for the newbies about what these wrappers should
>or should not save/restore, for instance one could now imagine the 'fp' and
>'ip' saving/restoring happening in these wrappers and only the overwiting of
>the 'lr' (r14) being a bug...

What "overwriting of lr" are you referring to?

p.


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]