summaryrefslogtreecommitdiffstats
path: root/bsps/powerpc
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2022-07-27 15:20:32 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2022-07-27 17:01:14 +0200
commit5810a08b574413a3aa66552d5eef62ab9bae0ce9 (patch)
tree6b02d98d47cd073239bf8f5f90f93b89ff05bdee /bsps/powerpc
parentpsxconfig01: Increase region area (diff)
downloadrtems-5810a08b574413a3aa66552d5eef62ab9bae0ce9.tar.bz2
Use __asm__ for standard C compatibility
Diffstat (limited to 'bsps/powerpc')
-rw-r--r--bsps/powerpc/include/bsp/tictac.h8
-rw-r--r--bsps/powerpc/include/libcpu/spr.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/bsps/powerpc/include/bsp/tictac.h b/bsps/powerpc/include/bsp/tictac.h
index 60179b47e0..9d87c04835 100644
--- a/bsps/powerpc/include/bsp/tictac.h
+++ b/bsps/powerpc/include/bsp/tictac.h
@@ -38,7 +38,7 @@
static inline void tic(void)
{
uint32_t tmp;
- asm volatile (
+ __asm__ volatile (
"mftb 0;"
"stw 0, ppc_tic_tac@sdarel(13);"
: "=r" (tmp)
@@ -52,7 +52,7 @@ static inline uint32_t tac(void)
{
uint32_t ticks;
uint32_t tmp;
- asm volatile (
+ __asm__ volatile (
"mftb %0;"
"lwz %1, ppc_tic_tac@sdarel(13);"
"subf %0, %1, %0;"
@@ -67,7 +67,7 @@ static inline uint32_t tac(void)
static inline void boom(void)
{
uint32_t tmp;
- asm volatile (
+ __asm__ volatile (
"mftb 0;"
"stw 0, ppc_boom_bam@sdarel(13);"
: "=r" (tmp)
@@ -81,7 +81,7 @@ static inline uint32_t bam(void)
{
uint32_t ticks;
uint32_t tmp;
- asm volatile (
+ __asm__ volatile (
"mftb %0;"
"lwz %1, ppc_boom_bam@sdarel(13);"
"subf %0, %1, %0;"
diff --git a/bsps/powerpc/include/libcpu/spr.h b/bsps/powerpc/include/libcpu/spr.h
index dea0cde63c..4655f24def 100644
--- a/bsps/powerpc/include/libcpu/spr.h
+++ b/bsps/powerpc/include/libcpu/spr.h
@@ -51,20 +51,20 @@ static inline unsigned long _read_##reg(void) \
static inline unsigned long _read_MSR(void)
{
unsigned long val;
- asm volatile("mfmsr %0" : "=r" (val));
+ __asm__ volatile("mfmsr %0" : "=r" (val));
return val;
}
static inline void _write_MSR(unsigned long val)
{
- asm volatile("mtmsr %0" : : "r" (val));
+ __asm__ volatile("mtmsr %0" : : "r" (val));
return;
}
static inline unsigned long _read_SR(void * va)
{
unsigned long val;
- asm volatile (
+ __asm__ volatile (
".machine \"push\"\n"
".machine \"any\"\n"
"mfsrin %0,%1\n"
@@ -77,7 +77,7 @@ static inline unsigned long _read_SR(void * va)
static inline void _write_SR(unsigned long val, void * va)
{
- asm volatile (
+ __asm__ volatile (
".machine \"push\"\n"
".machine \"any\"\n"
"mtsrin %0,%1\n"