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.
This commit is contained in:
Ralf Corsepius
2011-02-11 09:09:21 +00:00
parent 9f9371f562
commit 60cde416df
5 changed files with 17 additions and 12 deletions

View File

@@ -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

View File

@@ -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 */

View File

@@ -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

View File

@@ -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;
}

View File

@@ -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,