This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: m68k patch reviews


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
> RTE?

  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
  "interrupt_handler".

> 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.

  I would appriciate that.

  Gunther


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]