GCC for embedded PowerPC systems

Muthukumar Ratty muthu@iqmail.net
Wed Sep 29 02:58:00 GMT 2004


Hi Michael,
I guess I am spoiled by the linux irq thingies (which actually hides these
details). If you are not writing a handler for Linux then you
may have to do more asm work, as you/Ian mentioned. Sorry if I mislead
you.

Regards,
Muthu


On Tue, 28 Sep 2004, Michael Rausch wrote:

> On Mon, 27 Sep 2004 20:20:37 -0700 (PDT), Muthukumar Ratty
> <muthu@iqmail.net> wrote:
>
> >> 1) - Why is the #interrupt directive ignored by the PowerPC version of
> >> GCC?
> >
> > What does it do?
> >
> Ooops!
> The direcive is of course "#pragma interrupt".
> I expected it to instruct the compiler to generate a "return from
> interrupt" instruction at the end of the routine, instead of a "return
>  from subroutine".
> This is what happens for the SH2.
> The PowerPC actually has a "rfi" instruction, but the compiler silently
> ignores the directive; the generated assembly code is the same and there
> is no "rfi" at the end of the routine.
>
> >> 2) - Is it possible to write an interrupt service routine in pure C
> >> language?
> >
> > Yes.
> >
> Without embedded assembly?
>
> >> 3) - Is there any prologue/epilogue code to be written for interrupt
> >> service routines?
> >
> > No. Just the regular stuff, no blocking, quick, nested intr handling etc.
> >
> You mean that prologue/epilogue are the same for interrupt services
> routines and normal functions?
>
> > Google?
> >
> I took the decision to ask the mailing list after about one month of
> "googling" without finding really satisfying information (maybe there are
> better keywords than: GCC, GNU, EABI, interrupt, Powerpc, and so on... ;-)
> ).
>
> Thank you for your help!
>



More information about the Gcc-help mailing list