summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Kirchner <ralf.kirchner@embedded-brains.de>2012-11-13 18:09:19 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-11-29 15:08:42 +0100
commitd1c89524b27bb8772d9f02c80e72f52ee7659437 (patch)
tree126c17037b13b2880614154a8bba26ffaf1e27fa
parentscore: Documentation (diff)
downloadrtems-d1c89524b27bb8772d9f02c80e72f52ee7659437.tar.bz2
bsps/powerpc: Do not use GCC extern inline
-rw-r--r--c/src/lib/libcpu/powerpc/shared/include/byteorder.h20
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 f683c572c3..d8ab45cf1c 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