2011-02-11 Ralf Corsépius <ralf.corsepius@rtems.org>

* include/bsp.h, include/tm27.h:
	Use "__asm__" instead of "asm" for improved c99-compliance.
This commit is contained in:
Ralf Corsepius
2011-02-11 12:50:48 +00:00
parent 81ef6859b6
commit 3e6c5a7a0e
3 changed files with 13 additions and 8 deletions

View File

@@ -1,3 +1,8 @@
2011-02-11 Ralf Corsépius <ralf.corsepius@rtems.org>
* include/bsp.h, include/tm27.h:
Use "__asm__" instead of "asm" for improved c99-compliance.
2011-02-02 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Require autoconf-2.68, automake-1.11.1.

View File

@@ -168,20 +168,20 @@ extern int RTEMS_BSP_NETWORK_DRIVER_ATTACH();
static inline void lwmemBar()
{
asm volatile("lwsync":::"memory");
__asm__ volatile("lwsync":::"memory");
}
static inline void io_flush()
{
asm volatile("isync":::"memory");
__asm__ volatile("isync":::"memory");
}
static inline void memBar()
{
asm volatile("sync":::"memory");
__asm__ volatile("sync":::"memory");
}
static inline void ioBar()
{
asm volatile("eieio":::"memory");
__asm__ volatile("eieio":::"memory");
}
#endif

View File

@@ -42,23 +42,23 @@ void Install_tm27_vector(void (*_handler)())
#define Cause_tm27_intr() \
do { \
uint32_t _clicks = 1; \
asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
__asm__ volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
} while (0)
#define Clear_tm27_intr() \
do { \
uint32_t _clicks = 0xffffffff; \
asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
__asm__ volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
} while (0)
#define Lower_tm27_intr() \
do { \
uint32_t _msr = 0; \
_ISR_Set_level( 0 ); \
asm volatile( "mfmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
__asm__ volatile( "mfmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
_msr |= 0x8002; \
asm volatile( "mtmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
__asm__ volatile( "mtmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
} while (0)
#endif