m68k patch reviews
Bernardo Innocenti
bernie@develer.com
Thu Aug 21 20:48:00 GMT 2003
On Thursday 21 August 2003 09:53, Gunther Nikl wrote:
> I just noticed your patches and I guess they will cause some headaches for
> me. Especially these:
>
> http://gcc.gnu.org/ml/gcc-patches/2003-08/msg00752.html
> http://gcc.gnu.org/ml/gcc-patches/2003-08/msg01222.html
>
> The AmigaOS port modified INITIAL_FRAME_POINTER_OFFSET for __saveds and
> I added code for attribute handling (eg. generic regparm support for m68k)
> Unfortunately, the AmigaOS port has a "interrupt" attribute too, but with
> a different meaning :-(
I see. I've used GCC on the Amiga for quite some time and I've always
wanted to see GeekGadget patches merged into GCC. Several years ago I even
had a harsh discussion with RMS in person about that :-)
IIRC, the __saveds attribute told the compiler to reload the data section
pointer in A4 at function prologue time.
A very clean way to handle this would be adding a new test in m68k_save_reg():
if (saveds_function && (reg == DS_REGNO))
return true;
Then you'll get the old A4 saved on the stack along with other registers automatically,
without the need to fiddle with the frame size.
As for the attribute((interrupt)), wan't it used the same way on the Amiga? Or perhaps
it did only take care of callee-saved registers without using RTE?
In the latter case, I think we could rename this attribute to 'interrupt_handler' and
leave the Amiga semantics intact. Even though Amiga support is not yet in mainline,
I know there is a ton of Amiga code relying on this behaviour and we don't want to
break it in the future.
--
// Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/ http://www.develer.com/
Please don't send Word attachments - http://www.gnu.org/philosophy/no-word-attachments.html
More information about the Gcc
mailing list