GCC for embedded PowerPC systems
Michael Rausch
marausch@inwind.it
Tue Sep 28 11:18:00 GMT 2004
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!
--
Mch
More information about the Gcc-help
mailing list