[rtems commit] bsps/sparc: Change asm to __asm__ to compile with -pedantic.

Joel Sherrill joel at rtems.org
Fri Mar 21 15:14:54 UTC 2014


Module:    rtems
Branch:    master
Commit:    324032549efb11a89c1c1cf8080b9d2e93990581
Changeset: http://git.rtems.org/rtems/commit/?id=324032549efb11a89c1c1cf8080b9d2e93990581

Author:    Daniel Cederman <cederman at gaisler.com>
Date:      Thu Mar 13 14:26:00 2014 +0100

bsps/sparc: Change asm to __asm__ to compile with -pedantic.

---

 c/src/lib/libbsp/sparc/leon2/include/leon.h        |    2 +-
 .../libbsp/sparc/leon3/console/printk_support.c    |    8 ++++----
 c/src/lib/libbsp/sparc/leon3/include/leon.h        |    2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/c/src/lib/libbsp/sparc/leon2/include/leon.h b/c/src/lib/libbsp/sparc/leon2/include/leon.h
index 3936e82..d122f29 100644
--- a/c/src/lib/libbsp/sparc/leon2/include/leon.h
+++ b/c/src/lib/libbsp/sparc/leon2/include/leon.h
@@ -395,7 +395,7 @@ static __inline__ int bsp_irq_fixup(int irq)
 static inline unsigned int leon_r32_no_cache(uintptr_t addr)
 {
 	unsigned int tmp;
-	asm volatile (" lda [%1] 1, %0\n" : "=r"(tmp) : "r"(addr));
+	__asm__ volatile (" lda [%1] 1, %0\n" : "=r"(tmp) : "r"(addr));
 	return tmp;
 }
 
diff --git a/c/src/lib/libbsp/sparc/leon3/console/printk_support.c b/c/src/lib/libbsp/sparc/leon3/console/printk_support.c
index d4cc5a0..35fb4b5 100644
--- a/c/src/lib/libbsp/sparc/leon3/console/printk_support.c
+++ b/c/src/lib/libbsp/sparc/leon3/console/printk_support.c
@@ -89,10 +89,10 @@ void apbuart_outbyte_polled(
 send:
   while ( (regs->status & LEON_REG_UART_STATUS_THE) == 0 ) {
     /* Lower bus utilization while waiting for UART */
-    asm volatile ("nop"::); asm volatile ("nop"::);
-    asm volatile ("nop"::); asm volatile ("nop"::);
-    asm volatile ("nop"::); asm volatile ("nop"::);
-    asm volatile ("nop"::); asm volatile ("nop"::);
+    __asm__ volatile ("nop"::); __asm__ volatile ("nop"::);
+    __asm__ volatile ("nop"::); __asm__ volatile ("nop"::);
+    __asm__ volatile ("nop"::); __asm__ volatile ("nop"::);
+    __asm__ volatile ("nop"::); __asm__ volatile ("nop"::);
   }
   regs->data = (unsigned int) ch;
 
diff --git a/c/src/lib/libbsp/sparc/leon3/include/leon.h b/c/src/lib/libbsp/sparc/leon3/include/leon.h
index 537a0ef..6d2434d 100644
--- a/c/src/lib/libbsp/sparc/leon3/include/leon.h
+++ b/c/src/lib/libbsp/sparc/leon3/include/leon.h
@@ -291,7 +291,7 @@ extern rtems_interrupt_lock LEON3_IrqCtrl_Lock;
 static inline unsigned int leon_r32_no_cache(uintptr_t addr)
 {
 	unsigned int tmp;
-	asm volatile (" lda [%1] 1, %0\n" : "=r"(tmp) : "r"(addr));
+	__asm__ volatile (" lda [%1] 1, %0\n" : "=r"(tmp) : "r"(addr));
 	return tmp;
 }
 




More information about the vc mailing list