diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2011-02-11 09:09:21 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2011-02-11 09:09:21 +0000 |
commit | 60cde416dfd9f5a1765c2e8d5272290eabd15f0f (patch) | |
tree | 79c36ca78bd02d5168d0eb75192309ce8b950a3c /cpukit/score | |
parent | 2011-02-11 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-60cde416dfd9f5a1765c2e8d5272290eabd15f0f.tar.bz2 |
2011-02-11 Ralf Corsépius <ralf.corsepius@rtems.org>
* cpu.c, avr/interrupt.h, avr/power.h, rtems/score/cpu.h:
Use "__asm__" instead of "asm" for improved c99-compliance.
Diffstat (limited to 'cpukit/score')
-rw-r--r-- | cpukit/score/cpu/avr/ChangeLog | 5 | ||||
-rw-r--r-- | cpukit/score/cpu/avr/avr/interrupt.h | 8 | ||||
-rw-r--r-- | cpukit/score/cpu/avr/avr/power.h | 2 | ||||
-rw-r--r-- | cpukit/score/cpu/avr/cpu.c | 2 | ||||
-rw-r--r-- | cpukit/score/cpu/avr/rtems/score/cpu.h | 12 |
5 files changed, 17 insertions, 12 deletions
diff --git a/cpukit/score/cpu/avr/ChangeLog b/cpukit/score/cpu/avr/ChangeLog index b5a90610c8..cb2c509be0 100644 --- a/cpukit/score/cpu/avr/ChangeLog +++ b/cpukit/score/cpu/avr/ChangeLog @@ -1,3 +1,8 @@ +2011-02-11 Ralf Corsépius <ralf.corsepius@rtems.org> + + * cpu.c, avr/interrupt.h, avr/power.h, rtems/score/cpu.h: + Use "__asm__" instead of "asm" for improved c99-compliance. + 2010-11-06 Joel Sherrill <joel.sherrilL@OARcorp.com> PR 1715/cpukit diff --git a/cpukit/score/cpu/avr/avr/interrupt.h b/cpukit/score/cpu/avr/avr/interrupt.h index 9b10b414b4..e4077c16bc 100644 --- a/cpukit/score/cpu/avr/avr/interrupt.h +++ b/cpukit/score/cpu/avr/avr/interrupt.h @@ -218,21 +218,21 @@ # if defined(__AVR_MEGA__) && __AVR_MEGA__ # define ISR_ALIAS(vector, tgt) extern "C" void vector (void) \ __attribute__((signal, naked, __INTR_ATTRS)); \ - void vector (void) { asm volatile ("jmp " __STRINGIFY(tgt) ::); } + void vector (void) { __asm__ volatile ("jmp " __STRINGIFY(tgt) ::); } # else /* !__AVR_MEGA */ # define ISR_ALIAS(vector, tgt) extern "C" void vector (void) \ __attribute__((signal, naked, __INTR_ATTRS)); \ - void vector (void) { asm volatile ("rjmp " __STRINGIFY(tgt) ::); } + void vector (void) { __asm__ volatile ("rjmp " __STRINGIFY(tgt) ::); } # endif /* __AVR_MEGA__ */ #else /* !__cplusplus */ # if defined(__AVR_MEGA__) && __AVR_MEGA__ # define ISR_ALIAS(vector, tgt) void vector (void) \ __attribute__((signal, naked, __INTR_ATTRS)); \ - void vector (void) { asm volatile ("jmp " __STRINGIFY(tgt) ::); } + void vector (void) { __asm__ volatile ("jmp " __STRINGIFY(tgt) ::); } # else /* !__AVR_MEGA */ # define ISR_ALIAS(vector, tgt) void vector (void) \ __attribute__((signal, naked, __INTR_ATTRS)); \ - void vector (void) { asm volatile ("rjmp " __STRINGIFY(tgt) ::); } + void vector (void) { __asm__ volatile ("rjmp " __STRINGIFY(tgt) ::); } # endif /* __AVR_MEGA__ */ #endif /* __cplusplus */ diff --git a/cpukit/score/cpu/avr/avr/power.h b/cpukit/score/cpu/avr/avr/power.h index f17166142a..ee8af9edea 100644 --- a/cpukit/score/cpu/avr/avr/power.h +++ b/cpukit/score/cpu/avr/avr/power.h @@ -1377,7 +1377,7 @@ typedef enum } clock_div_t; -static __inline__ void clock_prescale_set(clock_div_t) __attribute__((__always_inline__)); +static inline void clock_prescale_set(clock_div_t) __attribute__((__always_inline__)); /** \addtogroup avr_power \code clock_prescale_set(x) \endcode diff --git a/cpukit/score/cpu/avr/cpu.c b/cpukit/score/cpu/avr/cpu.c index 38b1c3553b..32da69776e 100644 --- a/cpukit/score/cpu/avr/cpu.c +++ b/cpukit/score/cpu/avr/cpu.c @@ -166,7 +166,7 @@ void _CPU_Install_interrupt_stack( void ) void *_CPU_Thread_Idle_body( uintptr_t ignored ) { - for( ; ; ) asm volatile ("sleep"::); + for( ; ; ) __asm__ volatile ("sleep"::); /* insert your "halt" instruction here */ ; return (void *) 0; } diff --git a/cpukit/score/cpu/avr/rtems/score/cpu.h b/cpukit/score/cpu/avr/rtems/score/cpu.h index 0a43da29bc..95d5698ed2 100644 --- a/cpukit/score/cpu/avr/rtems/score/cpu.h +++ b/cpukit/score/cpu/avr/rtems/score/cpu.h @@ -425,7 +425,7 @@ extern "C" { typedef struct { uint16_t stack_pointer; - uint8_t status; //SREG + uint8_t status; /* SREG */ } Context_Control; #define _CPU_Context_Get_SP( _context ) \ @@ -623,7 +623,7 @@ SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context; #define _CPU_ISR_Disable( _isr_cookie ) \ do { \ (_isr_cookie) = SREG; \ - asm volatile ("cli"::); \ + __asm__ volatile ("cli"::); \ } while (0) /* @@ -639,7 +639,7 @@ SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context; #define _CPU_ISR_Enable( _isr_cookie ) \ do { \ SREG = _isr_cookie; \ - asm volatile ("sei"::); \ + __asm__ volatile ("sei"::); \ } while (0) /* @@ -656,9 +656,9 @@ SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context; #define _CPU_ISR_Flash( _isr_cookie ) \ do { \ SREG=(_isr_cookie); \ - asm volatile("sei"::); \ + __asm__ volatile("sei"::); \ (_isr_cookie) = SREG; \ - asm volatile("cli"::); \ + __asm__ volatile("cli"::); \ } while (0) /* @@ -924,7 +924,7 @@ uint32_t _CPU_ISR_Get_level( void ); /* functions */ -/*context_initialize asm function*/ +/*context_initialize asm-function*/ void context_initialize(unsigned short* context, unsigned short stack_add, |