m68k attribute interrupt
Paul Andrews
paul.andrews@smartmove.co.nz
Sat Apr 1 00:00:00 GMT 2000
>>From: Paul Andrews <paul.andrews@smartmove.co.nz>
>>Speaking of things 68k-ish: does anyone have a patch to add attribute
>>interrupt support?
>I'm surprised this isn't in there yet. I believe a patch was posted to
>either this list or the egcs list almost a year ago (I was in the middle of
>writing my own patch at the time). It might be in the mailing list
>archives.
I had a search through the archives but only found fragments of discussion,
not any patches :-( I believe it would be fairly simple to add the support.
Here's what I figure would do the trick in the m68k.c file:
In the output_function_prologue() function:
if ( function_is_interrupt() )
{
regmask = which_regs_this_function_uses()
output movem.l using bits in regmask
}
In the output_function_epilogue() function:
if ( function_is_interrupt() )
{
regmask = which_regs_this_function_uses()
output movem.l using bits in regmask
output an rte
}
If the prologue is done very first thing, before all the frame stuff and the
epilogue done very last of all it should be fairly simple. Another thought
I had is should it check that the function has the form void f(void) and
warn if not?
So the only complicated part is the function which_regs_this_functions_uses
which would tell us which registers we need to save on the stack. I'm not
sure if this information is even available...does any one know?
Cheers.
Paul.
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
More information about the crossgcc
mailing list