public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Interrupt handler attribute for m68k
@ 1998-12-15 14:28 Mike Stump
  1998-12-15 14:31 ` Jeffrey A Law
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Stump @ 1998-12-15 14:28 UTC (permalink / raw)
  To: jab3, law; +Cc: egcs

> Date: Tue, 15 Dec 1998 14:57:06 -0700
> From: Jeffrey A Law <law@hurl.cygnus.com>

> "__interrupt_handler__" was mandated by external forces :(

I would mandate people use 

#define __interrupt__ __interrupt_handler__

if they want this, I think egcs should be consistent and less subject
to `bad' decisions.  I think we should be willing to accept a fix for
this.

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: Interrupt handler attribute for m68k
@ 1998-12-16 10:16 John Breen
  0 siblings, 0 replies; 5+ messages in thread
From: John Breen @ 1998-12-16 10:16 UTC (permalink / raw)
  To: egcs

From: Jeffrey A Law <law@hurl.cygnus.com>
>  > [...]  Which one would be the best to use as a model?
>Not sure.  Probably whichever port has code which most closely 
>matches the m68k's prologue/epilogue code.

Maybe I'm being naive about this.  From what I've been told, people 
currently use a wrapper like this for interrupts on m68k:

        movem.l %d0-%d1/%a0-%a1,-(%sp)
        jsr     c_function
        movem.l (%sp)+,%d0-%d1/%a0-%a1
        rte

My plan was simply to have the prologue code save these registers also 
if it's an interrupt handler, and the epilogue restore them and do an 
rte instead of an rts.  The rest of the prologue/epilogue code would 
stay the same.

If it takes much more than that, then I'm probably in over my head.
--
John A. Breen
jab3@hotmail.com


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Interrupt handler attribute for m68k
@ 1998-12-15 13:43 John Breen
  1998-12-15 13:58 ` Jeffrey A Law
  0 siblings, 1 reply; 5+ messages in thread
From: John Breen @ 1998-12-15 13:43 UTC (permalink / raw)
  To: egcs

I was thinking of trying my hand at implementing an attribute for 
specifying interrupt handlers for the m68k.  I see that it's been done 
for a handful of processors, but they all seem to do things a little 
differently.  Which one would be the best to use as a model?

The first question that occurs to me is what should the attribute be 
called?  Most seem to use __interrupt__, although one appeared to use 
__interrupt_handler__.  Then again, Motorola (at least) uses the more 
general term "exception", although I'll be happy to stick with 
__interrupt__ if it will minimize confusion.

Also, if anyone else is currently working on this (or started but put it 
on the shelf), let me know.
--
John A. Breen
jab3@hotmail.com


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1998-12-16 10:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-15 14:28 Interrupt handler attribute for m68k Mike Stump
1998-12-15 14:31 ` Jeffrey A Law
  -- strict thread matches above, loose matches on Subject: below --
1998-12-16 10:16 John Breen
1998-12-15 13:43 John Breen
1998-12-15 13:58 ` Jeffrey A Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).