This is the mail archive of the
mailing list for the GCC project.
Re: m68k patch reviews
- From: Gunther Nikl <gni at gecko dot de>
- To: Bernardo Innocenti <bernie at develer dot com>
- Cc: gcc at gcc dot gnu dot org, Peter dot Barada at motorola dot com
- Date: Fri, 22 Aug 2003 11:44:37 +0200
- Subject: Re: m68k patch reviews
- References: <email@example.com> <firstname.lastname@example.org> <20030821075350.GB94342@lorien.int.gecko.de> <email@example.com>
On Thu, Aug 21, 2003 at 08:31:41PM +0200, Bernardo Innocenti wrote:
> IIRC, the __saveds attribute told the compiler to reload the data section
> pointer in A4 at function prologue time.
Yes, when compiling for smalldata.
> 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.
Something like that is already present. Since with your patch the
stacklayout code uses m68k_save_reg() it simply works ;-)
> As for the attribute((interrupt)), wan't it used the same way on the Amiga?
I don't know if that attribute is any good for AmigaOS.
> Or perhaps it did only take care of callee-saved registers without using
Interrupt functions in AmigaOS context are almost normal functions. They
have the same scratch registers and must use "rts" to return to the OS.
The only thing they must do is to set the condition codes on exit. Thus
the interrrupt attribute inserts a "tstl d0" before the "rts".
> In the latter case, I think we could rename this attribute to
> 'interrupt_handler' and leave the Amiga semantics intact.
Please do. According the the GCC docs some ports use "interrupt" and some
> 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
I would appriciate that.