This is the mail archive of the
mailing list for the GCC project.
Re: m68k patch reviews
- From: Bernardo Innocenti <bernie at develer dot com>
- To: Gunther Nikl <gni at gecko dot de>
- Cc: gcc at gcc dot gnu dot org,Richard Henderson <rth at redhat dot com>,Peter dot Barada at motorola dot com,Peter Barada <pbarada at mail dot wm dot sps dot mot dot com>
- Date: Thu, 21 Aug 2003 20:31:41 +0200
- Subject: Re: m68k patch reviews
- Organization: Develer S.r.l.
- References: <firstname.lastname@example.org> <email@example.com> <20030821075350.GB94342@lorien.int.gecko.de>
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:
> 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))
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.
Please don't send Word attachments - http://www.gnu.org/philosophy/no-word-attachments.html