diff mbox

[PATCHv2,4/4] linux-generic: asm comatible with -std=c99

Message ID 1399060067-22104-5-git-send-email-anders.roxell@linaro.org
State Accepted
Headers show

Commit Message

Anders Roxell May 2, 2014, 7:47 p.m. UTC
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 platform/linux-generic/include/odp_spin_internal.h | 30 +++++++++++-----------
 platform/linux-generic/source/odp_time.c           |  4 +--
 2 files changed, 17 insertions(+), 17 deletions(-)
diff mbox

Patch

diff --git a/platform/linux-generic/include/odp_spin_internal.h b/platform/linux-generic/include/odp_spin_internal.h
index 1061e52..ec04e3c 100644
--- a/platform/linux-generic/include/odp_spin_internal.h
+++ b/platform/linux-generic/include/odp_spin_internal.h
@@ -19,7 +19,7 @@  extern "C" {
  */
 static inline void odp_mem_barrier(void)
 {
-	asm __volatile__ ("" : : : "memory");
+	__asm__ __volatile__ ("" : : : "memory");
 }
 
 
@@ -31,30 +31,30 @@  static inline void odp_spin(void)
 #if defined __x86_64__ || defined __i386__
 
 	#ifdef __SSE2__
-	asm __volatile__ ("pause");
+	__asm__ __volatile__ ("pause");
 	#else
-	asm __volatile__ ("rep; nop");
+	__asm__ __volatile__ ("rep; nop");
 	#endif
 
 #elif defined __arm__
 
 	#if __ARM_ARCH == 7
-	asm __volatile__ ("nop");
-	asm __volatile__ ("nop");
-	asm __volatile__ ("nop");
-	asm __volatile__ ("nop");
+	__asm__ __volatile__ ("nop");
+	__asm__ __volatile__ ("nop");
+	__asm__ __volatile__ ("nop");
+	__asm__ __volatile__ ("nop");
 	#endif
 
 #elif defined __OCTEON__
 
-	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");
 
 #endif
 }
diff --git a/platform/linux-generic/source/odp_time.c b/platform/linux-generic/source/odp_time.c
index 4f5e507..181294a 100644
--- a/platform/linux-generic/source/odp_time.c
+++ b/platform/linux-generic/source/odp_time.c
@@ -23,7 +23,7 @@  uint64_t odp_time_get_cycles(void)
 		};
 	} tsc;
 
-	asm volatile("rdtsc" :
+	__asm__ __volatile__ ("rdtsc" :
 		     "=a" (tsc.lo_32),
 		     "=d" (tsc.hi_32) : : "memory");
 
@@ -39,7 +39,7 @@  uint64_t odp_time_get_cycles(void)
 	#define CVMX_TMP_STR2(x) #x
 	uint64_t cycle;
 
-	asm __volatile__ ("rdhwr %[rt],$" CVMX_TMP_STR(31) :
+	__asm__ __volatile__ ("rdhwr %[rt],$" CVMX_TMP_STR(31) :
 			   [rt] "=d" (cycle) : : "memory");
 
 	return cycle;