avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] Re: [avr-gcc-list] Two interrupts one function?


From: Anatoly Sokolov
Subject: Re: [avr-libc-dev] Re: [avr-gcc-list] Two interrupts one function?
Date: Sat, 27 May 2006 15:15:26 +0400

Hi.

>
> I'd be more happy if AVR-GCC implemented the
> __attribute__((alias(...))).  It would allow something like
>
> #define __ALIAS(tgt) __attribute__((alias(#tgt)))
> #define ISR_ALIAS(vec, tgt) \
> void vec(void) __ALIAS(tgt)
>
> ISR(INT0_vect)
> {
>        PORTB = 42;
> }
>
> ISR_ALIAS(INT1_vect, INT0_vect);
>
>

This patch adds support of the __attribute__((alias(...)))  in AVR-GCC. No 
new regresion in GCC testsuite.

Index: gcc/config/avr/avr.h
===================================================================
--- gcc/config/avr/avr.h (revision 113886)
+++ gcc/config/avr/avr.h (working copy)
@@ -591,6 +591,8 @@
 /* Globalizing directive for a label.  */
 #define GLOBAL_ASM_OP ".global\t"

+#define SET_ASM_OP "\t.set\t"
+
 #define ASM_WEAKEN_LABEL(FILE, NAME) \
   do     \
     {     \

Anatoly. 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]