This is the mail archive of the gcc-patches@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: [patch] m68k: Accept "interrupt" attribute.



> -----Original Message-----
> From: Bernardo Innocenti [mailto:bernie@codewiz.org]
> Sent: Tuesday, June 19, 2007 12:12 PM
> To: Mark Mitchell
> Cc: Kazu Hirata; gcc-patches@gcc.gnu.org; law@redhat.com;
> schwab@suse.de
> Subject: Re: [patch] m68k: Accept "interrupt" attribute.
>
> Mark Mitchell wrote:
>
> > As this is an unsubmitted port from quite some time ago, I think we
> > should just ignore it.  It seems much more valuable to have
> this kind of
> > cross-platform consistency in the FSF distributions.
>
> While I agree on the general principle, in the case of
> __attribute__((interrupt)), it should be noted that using the
> same name across all backends is not going to improve consistency
> that much, because the existing implementations vary greatly in
> semantics and even syntax.

For example, in the AVR port the "interrupt" attribute specifies an ISR that
is interruptible, i.e. global interrupts are *enabled* during the ISR. The
AVR port also has a "signal" attribute that specifies an ISR where global
interrupts are disabled during the ISR. In practice, the "signal" attribute
is the one that is most often used (and most often required) to declare an
ISR, as the "interrupt" attribute can cause problems if not used carefully
(nested interrupts). Though to most users' thinking, using the "interrupt"
attribute is the most common-sense way to declare an ISR. This difference in
the names of the attributes has caused many, many problems for users of the
AVR port. So much, that avr-libc provides a convenience macro to hide the
underlying issue from most users.

So yes, it helps somewhat, but I agree with Bernardo in that semantics can
vary, unfortunately.

Eric Weddington



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