From: Borja F. <bor...@gm...> - 2012-03-06 18:56:42
|
I've added some checks to the frontend when setting the signal/interrupt attribute that are the following: 1) warn when the attrib is used in things that aren't function declarations. 2) warn when the function has arguments 3) warn when the function doesnt return a void If anybody can think of any more checks that are required let me know. Oh, and here are the warning messages printed for cases 2 and 3 respectively, again, if somebody has a better descriptive string or with better english I'll change it: 2) "'%0' attribute only applies to functions with no arguments" 3) "'%0' attribute only applies to functions with a void return type" where %0 is either interrupt or signal 2012/3/6 Borja Ferrer <bor...@gm...> > Heh ok :) that's why I did the truth table above, because some attributes > override others and we want to have the same behaviour as gcc. Now that > everything is clear I'll implement this next. > > Btw, I've already fixed the case of not emitting ret/reti when naked is > present. > > 2012/3/6 Weddington, Eric <Eri...@at...> > > >> >> > -----Original Message----- >> > From: Borja Ferrer [mailto:bor...@gm...] >> > Sent: Monday, March 05, 2012 5:43 PM >> > To: Weddington, Eric >> > Cc: avr...@li... >> > Subject: Re: [avr-llvm-devel] Interrupt handling >> > >> > >> > #define ISR(vector, ...) \ >> > void vector (void) __attribute__ ((signal,__INTR_ATTRS)) >> __VA_ARGS__; \ >> > void vector (void) >> > # define ISR_NOBLOCK __attribute__((interrupt)) >> > >> > >> >> Hmm. Yeah, ok, you're correct about that. I forgot about all that stuff >> that was added to avr-libc. >> >> So, in this case, the "interrupt" attribute overrides "signal". >> >> I think you're good to go now. :-) >> >> Eric >> > > |