[rtems commit] bsps/powerpc: Do not use GCC extern inline
Sebastian Huber
sebh at rtems.org
Thu Nov 29 14:04:40 UTC 2012
Module: rtems
Branch: master
Commit: d1c89524b27bb8772d9f02c80e72f52ee7659437
Changeset: http://git.rtems.org/rtems/commit/?id=d1c89524b27bb8772d9f02c80e72f52ee7659437
Author: Ralf Kirchner <ralf.kirchner at embedded-brains.de>
Date: Tue Nov 13 18:09:19 2012 +0100
bsps/powerpc: Do not use GCC extern inline
---
.../lib/libcpu/powerpc/shared/include/byteorder.h | 20 ++++++++------------
1 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/c/src/lib/libcpu/powerpc/shared/include/byteorder.h b/c/src/lib/libcpu/powerpc/shared/include/byteorder.h
index f683c57..d8ab45c 100644
--- a/c/src/lib/libcpu/powerpc/shared/include/byteorder.h
+++ b/c/src/lib/libcpu/powerpc/shared/include/byteorder.h
@@ -21,36 +21,32 @@
extern "C" {
#endif
-#ifdef __GNUC__
-
-extern __inline__ unsigned ld_le16(volatile uint16_t *addr)
+static inline unsigned ld_le16(volatile uint16_t *addr)
{
unsigned val;
- __asm__ __volatile__ ("lhbrx %0,0,%1" : "=r" (val) : "r" (addr), "m" (*addr));
+ __asm__ volatile ("lhbrx %0,0,%1" : "=r" (val) : "r" (addr), "m" (*addr));
return val;
}
-extern __inline__ void st_le16(volatile uint16_t *addr, unsigned val)
+static inline void st_le16(volatile uint16_t *addr, unsigned val)
{
- __asm__ __volatile__ ("sthbrx %1,0,%2" : "=m" (*addr) : "r" (val), "r" (addr));
+ __asm__ volatile ("sthbrx %1,0,%2" : "=m" (*addr) : "r" (val), "r" (addr));
}
-extern __inline__ unsigned ld_le32(volatile uint32_t *addr)
+static inline unsigned ld_le32(volatile uint32_t *addr)
{
unsigned val;
- __asm__ __volatile__ ("lwbrx %0,0,%1" : "=r" (val) : "r" (addr), "m" (*addr));
+ __asm__ volatile ("lwbrx %0,0,%1" : "=r" (val) : "r" (addr), "m" (*addr));
return val;
}
-extern __inline__ void st_le32(volatile uint32_t *addr, unsigned val)
+static inline void st_le32(volatile uint32_t *addr, unsigned val)
{
- __asm__ __volatile__ ("stwbrx %1,0,%2" : "=m" (*addr) : "r" (val), "r" (addr));
+ __asm__ volatile ("stwbrx %1,0,%2" : "=m" (*addr) : "r" (val), "r" (addr));
}
-#endif /* __GNUC__ */
-
#ifdef __cplusplus
}
#endif
More information about the vc
mailing list