Browse Source

change asm/volatile to __x__

Peter S. Mazinger 18 years ago
parent
commit
fd56af193e
30 changed files with 93 additions and 93 deletions
  1. 3 3
      libpthread/linuxthreads/condvar.c
  2. 4 4
      libpthread/linuxthreads/internals.h
  3. 2 2
      libpthread/linuxthreads/join.c
  4. 5 5
      libpthread/linuxthreads/manager.c
  5. 2 2
      libpthread/linuxthreads/semaphore.c
  6. 1 1
      libpthread/linuxthreads/signals.c
  7. 2 2
      libpthread/linuxthreads/spinlock.c
  8. 3 3
      libpthread/linuxthreads/sysdeps/alpha/pspinlock.c
  9. 2 2
      libpthread/linuxthreads/sysdeps/arm/pspinlock.c
  10. 2 2
      libpthread/linuxthreads/sysdeps/hppa/pspinlock.c
  11. 3 3
      libpthread/linuxthreads/sysdeps/i386/pspinlock.c
  12. 5 5
      libpthread/linuxthreads/sysdeps/i386/tls.h
  13. 6 6
      libpthread/linuxthreads/sysdeps/i386/useldt.h
  14. 1 1
      libpthread/linuxthreads/sysdeps/ia64/pspinlock.c
  15. 1 1
      libpthread/linuxthreads/sysdeps/ia64/pt-machine.h
  16. 2 2
      libpthread/linuxthreads/sysdeps/m68k/pspinlock.c
  17. 2 2
      libpthread/linuxthreads/sysdeps/mips/pspinlock.c
  18. 1 1
      libpthread/linuxthreads/sysdeps/mips/tls.h
  19. 1 1
      libpthread/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h
  20. 20 20
      libpthread/linuxthreads/sysdeps/pthread/pt-initfini.c
  21. 3 3
      libpthread/linuxthreads/sysdeps/s390/pspinlock.c
  22. 2 2
      libpthread/linuxthreads/sysdeps/sh/pspinlock.c
  23. 6 6
      libpthread/linuxthreads/sysdeps/sh/tls.h
  24. 2 2
      libpthread/linuxthreads/sysdeps/sparc/sparc32/pspinlock.c
  25. 3 3
      libpthread/linuxthreads/sysdeps/sparc/sparc32/sparcv9/pspinlock.c
  26. 3 3
      libpthread/linuxthreads/sysdeps/sparc/sparc64/pspinlock.c
  27. 1 1
      libpthread/linuxthreads/sysdeps/unix/sysv/linux/mq_notify.c
  28. 1 1
      libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/fork.h
  29. 3 3
      libpthread/linuxthreads/sysdeps/x86_64/pspinlock.c
  30. 1 1
      libpthread/linuxthreads/sysdeps/x86_64/tls.h

+ 3 - 3
libpthread/linuxthreads/condvar.c

@@ -46,7 +46,7 @@ strong_alias (__pthread_cond_destroy, pthread_cond_destroy)
 
 static int cond_extricate_func(void *obj, pthread_descr th)
 {
-  volatile pthread_descr self = thread_self();
+  __volatile__ pthread_descr self = thread_self();
   pthread_cond_t *cond = obj;
   int did_remove = 0;
 
@@ -59,7 +59,7 @@ static int cond_extricate_func(void *obj, pthread_descr th)
 
 int __pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
 {
-  volatile pthread_descr self = thread_self();
+  __volatile__ pthread_descr self = thread_self();
   pthread_extricate_if extr;
   int already_canceled = 0;
   int spurious_wakeup_count;
@@ -141,7 +141,7 @@ pthread_cond_timedwait_relative(pthread_cond_t *cond,
 				pthread_mutex_t *mutex,
 				const struct timespec * abstime)
 {
-  volatile pthread_descr self = thread_self();
+  __volatile__ pthread_descr self = thread_self();
   int already_canceled = 0;
   pthread_extricate_if extr;
   int spurious_wakeup_count;

+ 4 - 4
libpthread/linuxthreads/internals.h

@@ -161,13 +161,13 @@ extern int __pthread_exit_requested, __pthread_exit_code;
 
 /* Set to 1 by gdb if we're debugging */
 
-extern volatile int __pthread_threads_debug;
+extern __volatile__ int __pthread_threads_debug;
 
 /* Globally enabled events.  */
-extern volatile td_thr_events_t __pthread_threads_events;
+extern __volatile__ td_thr_events_t __pthread_threads_events;
 
 /* Pointer to descriptor of thread with last event.  */
-extern volatile pthread_descr __pthread_last_event;
+extern __volatile__ pthread_descr __pthread_last_event;
 
 /* Flag which tells whether we are executing on SMP kernel. */
 extern int __pthread_smp_kernel;
@@ -229,7 +229,7 @@ static inline int nonexisting_handle(pthread_handle h, pthread_t id)
    distinguish between full, read and write barriers.  */
 
 #ifndef MEMORY_BARRIER
-#define MEMORY_BARRIER() asm ("" : : : "memory")
+#define MEMORY_BARRIER() __asm__ ("" : : : "memory")
 #endif
 #ifndef READ_MEMORY_BARRIER
 #define READ_MEMORY_BARRIER() MEMORY_BARRIER()

+ 2 - 2
libpthread/linuxthreads/join.c

@@ -97,7 +97,7 @@ void __pthread_do_exit(void *retval, char *currentframe)
 
 static int join_extricate_func(void *obj, pthread_descr th)
 {
-  volatile pthread_descr self = thread_self();
+  __volatile__ pthread_descr self = thread_self();
   pthread_handle handle = obj;
   pthread_descr jo;
   int did_remove = 0;
@@ -113,7 +113,7 @@ static int join_extricate_func(void *obj, pthread_descr th)
 
 int pthread_join(pthread_t thread_id, void ** thread_return)
 {
-  volatile pthread_descr self = thread_self();
+  __volatile__ pthread_descr self = thread_self();
   struct pthread_request request;
   pthread_handle handle = thread_handle(thread_id);
   pthread_descr th;

+ 5 - 5
libpthread/linuxthreads/manager.c

@@ -52,17 +52,17 @@ int __pthread_nonstandard_stacks;
 #endif
 
 /* Number of active entries in __pthread_handles (used by gdb) */
-volatile int __pthread_handles_num = 2;
+__volatile__ int __pthread_handles_num = 2;
 
 /* Whether to use debugger additional actions for thread creation
    (set to 1 by gdb) */
-volatile int __pthread_threads_debug;
+__volatile__ int __pthread_threads_debug;
 
 /* Globally enabled events.  */
-volatile td_thr_events_t __pthread_threads_events;
+__volatile__ td_thr_events_t __pthread_threads_events;
 
 /* Pointer to thread descriptor with last event.  */
-volatile pthread_descr __pthread_last_event;
+__volatile__ pthread_descr __pthread_last_event;
 
 static pthread_descr manager_thread;
 
@@ -87,7 +87,7 @@ static inline pthread_descr thread_segment(int seg)
 
 /* Flag set in signal handler to record child termination */
 
-static volatile int terminated_children;
+static __volatile__ int terminated_children;
 
 /* Flag set when the initial thread is blocked on pthread_exit waiting
    for all other threads to terminate */

+ 2 - 2
libpthread/linuxthreads/semaphore.c

@@ -44,7 +44,7 @@ int sem_init(sem_t *sem, int pshared, unsigned int value)
 
 static int new_sem_extricate_func(void *obj, pthread_descr th)
 {
-  volatile pthread_descr self = thread_self();
+  __volatile__ pthread_descr self = thread_self();
   sem_t *sem = obj;
   int did_remove = 0;
 
@@ -57,7 +57,7 @@ static int new_sem_extricate_func(void *obj, pthread_descr th)
 
 int sem_wait(sem_t * sem)
 {
-  volatile pthread_descr self = thread_self();
+  __volatile__ pthread_descr self = thread_self();
   pthread_extricate_if extr;
   int already_canceled = 0;
   int spurious_wakeup_count;

+ 1 - 1
libpthread/linuxthreads/signals.c

@@ -141,7 +141,7 @@ strong_alias(__pthread_sigaction, sigaction)
 /* sigwait -- synchronously wait for a signal */
 int __pthread_sigwait(const sigset_t * set, int * sig)
 {
-  volatile pthread_descr self = thread_self();
+  __volatile__ pthread_descr self = thread_self();
   sigset_t mask;
   int s;
   sigjmp_buf jmpbuf;

+ 2 - 2
libpthread/linuxthreads/spinlock.c

@@ -30,7 +30,7 @@ static inline void __pthread_release(int * spinlock)
 {
   WRITE_MEMORY_BARRIER();
   *spinlock = __LT_SPINLOCK_INIT;
-  __asm __volatile ("" : "=m" (*spinlock) : "m" (*spinlock));
+  __asm__ __volatile__ ("" : "=m" (*spinlock) : "m" (*spinlock));
 }
 
 
@@ -106,7 +106,7 @@ void internal_function __pthread_lock(struct _pthread_fastlock * lock,
 #ifdef BUSY_WAIT_NOP
       BUSY_WAIT_NOP;
 #endif
-      __asm __volatile ("" : "=m" (lock->__status) : "m" (lock->__status));
+      __asm__ __volatile__ ("" : "=m" (lock->__status) : "m" (lock->__status));
     }
 
     lock->__spinlock += (spin_count - lock->__spinlock) / 8;

+ 3 - 3
libpthread/linuxthreads/sysdeps/alpha/pspinlock.c

@@ -35,7 +35,7 @@ int
 __pthread_spin_lock (pthread_spinlock_t *lock)
 {
   unsigned int tmp;
-  asm volatile
+  __asm__ __volatile__
     ("1:	ldl_l	%0,%1\n"
      "		blbs	%0,2f\n"
      "		or	%0,1,%0\n"
@@ -60,7 +60,7 @@ __pthread_spin_trylock (pthread_spinlock_t *lock)
   unsigned long int oldval;
   unsigned long int temp;
 
-  asm volatile
+  __asm__ __volatile__
     ("1:	ldl_l	%0,%1\n"
      "		and	%0,%3,%2\n"
      "		bne	%2,2f\n"
@@ -83,7 +83,7 @@ weak_alias (__pthread_spin_trylock, pthread_spin_trylock)
 int
 __pthread_spin_unlock (pthread_spinlock_t *lock)
 {
-  asm volatile ("mb");
+  __asm__ __volatile__ ("mb");
   return *lock = 0;
 }
 weak_alias (__pthread_spin_unlock, pthread_spin_unlock)

+ 2 - 2
libpthread/linuxthreads/sysdeps/arm/pspinlock.c

@@ -28,7 +28,7 @@ __pthread_spin_lock (pthread_spinlock_t *lock)
   unsigned int val;
 
   do
-    asm volatile ("swp %0, %1, [%2]"
+    __asm__ __volatile__ ("swp %0, %1, [%2]"
 		  : "=r" (val)
 		  : "0" (1), "r" (lock)
 		  : "memory");
@@ -44,7 +44,7 @@ __pthread_spin_trylock (pthread_spinlock_t *lock)
 {
   unsigned int val;
 
-  asm volatile ("swp %0, %1, [%2]"
+  __asm__ __volatile__ ("swp %0, %1, [%2]"
 		: "=r" (val)
 		: "0" (1), "r" (lock)
 		: "memory");

+ 2 - 2
libpthread/linuxthreads/sysdeps/hppa/pspinlock.c

@@ -27,7 +27,7 @@ __pthread_spin_lock (pthread_spinlock_t *lock)
   unsigned int val;
 
   do
-    asm volatile ("ldcw %1,%0"
+    __asm__ __volatile__ ("ldcw %1,%0"
 		  : "=r" (val), "=m" (*lock)
 		  : "m" (*lock));
   while (!val);
@@ -42,7 +42,7 @@ __pthread_spin_trylock (pthread_spinlock_t *lock)
 {
   unsigned int val;
 
-  asm volatile ("ldcw %1,%0"
+  __asm__ __volatile__ ("ldcw %1,%0"
 		: "=r" (val), "=m" (*lock)
 		: "m" (*lock));
 

+ 3 - 3
libpthread/linuxthreads/sysdeps/i386/pspinlock.c

@@ -35,7 +35,7 @@
 int
 __pthread_spin_lock (pthread_spinlock_t *lock)
 {
-  asm volatile
+  __asm__ __volatile__
     ("\n"
      "1:\n\t"
      "lock; decl %0\n\t"
@@ -58,7 +58,7 @@ __pthread_spin_trylock (pthread_spinlock_t *lock)
 {
   int oldval;
 
-  asm volatile
+  __asm__ __volatile__
     ("xchgl %0,%1"
      : "=r" (oldval), "=m" (*lock)
      : "0" (0));
@@ -70,7 +70,7 @@ weak_alias (__pthread_spin_trylock, pthread_spin_trylock)
 int
 __pthread_spin_unlock (pthread_spinlock_t *lock)
 {
-  asm volatile
+  __asm__ __volatile__
     ("movl $1,%0"
      : "=m" (*lock));
   return 0;

+ 5 - 5
libpthread/linuxthreads/sysdeps/i386/tls.h

@@ -136,7 +136,7 @@ TLS_DO_MODIFY_LDT_KERNEL_CHECK(						      \
     { nr, (unsigned long int) (descr), 0xfffff /* 4GB in pages */,	      \
       1, 0, 0, 1, 0, 1, 0 };						      \
   int result;								      \
-  asm volatile (TLS_LOAD_EBX						      \
+  __asm__ __volatile__ (TLS_LOAD_EBX						      \
 		"int $0x80\n\t"						      \
 		TLS_LOAD_EBX						      \
 		: "=a" (result)						      \
@@ -147,7 +147,7 @@ TLS_DO_MODIFY_LDT_KERNEL_CHECK(						      \
 		"m" (ldt_entry), TLS_EBX_ARG (1), "c" (&ldt_entry),	      \
 		"d" (sizeof (ldt_entry)));				      \
   __builtin_expect (result, 0) == 0					      \
-  ? ({ asm ("movw %w0, %%gs" : : "q" ((nr) * 8 + 7)); NULL; })		      \
+  ? ({ __asm__ ("movw %w0, %%gs" : : "q" ((nr) * 8 + 7)); NULL; })		      \
   : "cannot set up LDT for thread-local storage\n";			      \
 }))
 
@@ -159,9 +159,9 @@ TLS_DO_MODIFY_LDT_KERNEL_CHECK(						      \
   int result;								      \
   if (secondcall)							      \
     ldt_entry.entry_number = ({ int _gs;				      \
-				asm ("movw %%gs, %w0" : "=q" (_gs));	      \
+				__asm__ ("movw %%gs, %w0" : "=q" (_gs));	      \
 				(_gs & 0xffff) >> 3; });		      \
-  asm volatile (TLS_LOAD_EBX						      \
+  __asm__ __volatile__ (TLS_LOAD_EBX						      \
 		"int $0x80\n\t"						      \
 		TLS_LOAD_EBX						      \
 		: "=a" (result), "=m" (ldt_entry.entry_number)		      \
@@ -171,7 +171,7 @@ TLS_DO_MODIFY_LDT_KERNEL_CHECK(						      \
 		   here.  */						      \
 		TLS_EBX_ARG (&ldt_entry), "m" (ldt_entry));		      \
   if (__builtin_expect (result, 0) == 0)				      \
-    asm ("movw %w0, %%gs" : : "q" (ldt_entry.entry_number * 8 + 3));	      \
+    __asm__ ("movw %w0, %%gs" : : "q" (ldt_entry.entry_number * 8 + 3));	      \
   result;								      \
 })
 

+ 6 - 6
libpthread/linuxthreads/sysdeps/i386/useldt.h

@@ -72,7 +72,7 @@ extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);
       1, 0, 0, 1, 0, 1, 0 };						      \
   if (__modify_ldt (1, &ldt_entry, sizeof (ldt_entry)) != 0)		      \
     abort ();								      \
-  asm ("movw %w0, %%gs" : : "q" (nr * 8 + 7));				      \
+  __asm__ ("movw %w0, %%gs" : : "q" (nr * 8 + 7));				      \
 })
 
 #ifdef __PIC__
@@ -98,14 +98,14 @@ extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);
   int __gs;								      \
   if (DO_SET_THREAD_AREA_REUSE (nr))					      \
     {									      \
-      asm ("movw %%gs, %w0" : "=q" (__gs));				      \
+      __asm__ ("movw %%gs, %w0" : "=q" (__gs));				      \
       struct modify_ldt_ldt_s ldt_entry =				      \
 	{ (__gs & 0xffff) >> 3,						      \
 	  (unsigned long int) (descr), 0xfffff /* 4GB in pages */,	      \
 	  1, 0, 0, 1, 0, 1, 0 };					      \
 									      \
       int __result;							      \
-      __asm (USETLS_LOAD_EBX						      \
+      __asm__ (USETLS_LOAD_EBX						      \
 	     "movl %2, %%eax\n\t"					      \
 	     "int $0x80\n\t"						      \
 	     USETLS_LOAD_EBX						      \
@@ -114,7 +114,7 @@ extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);
 	       "m" (ldt_entry)						      \
 	     : "memory");						      \
       if (__result == 0)						      \
-	asm ("movw %w0, %%gs" :: "q" (__gs));				      \
+	__asm__ ("movw %w0, %%gs" :: "q" (__gs));				      \
       else								      \
 	__gs = -1;							      \
     }									      \
@@ -125,7 +125,7 @@ extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);
 	  (unsigned long int) (descr), 0xfffff /* 4GB in pages */,	      \
 	  1, 0, 0, 1, 0, 1, 0 };					      \
       int __result;							      \
-      __asm (USETLS_LOAD_EBX						      \
+      __asm__ (USETLS_LOAD_EBX						      \
 	     "movl %2, %%eax\n\t"					      \
 	     "int $0x80\n\t"						      \
 	     USETLS_LOAD_EBX						      \
@@ -136,7 +136,7 @@ extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t);
       if (__result == 0)						      \
 	{								      \
 	  __gs = (ldt_entry.entry_number << 3) + 3;			      \
-	  asm ("movw %w0, %%gs" : : "q" (__gs));			      \
+	  __asm__ ("movw %w0, %%gs" : : "q" (__gs));			      \
 	}								      \
       else								      \
 	__gs = -1;							      \

+ 1 - 1
libpthread/linuxthreads/sysdeps/ia64/pspinlock.c

@@ -35,7 +35,7 @@ __pthread_spin_lock (pthread_spinlock_t *lock)
     {
       /* Spin without using the atomic instruction.  */
       do
-        __asm __volatile ("" : : : "memory");
+        __asm__ __volatile__ ("" : : : "memory");
       while (*p);
     }
   return 0;

+ 1 - 1
libpthread/linuxthreads/sysdeps/ia64/pt-machine.h

@@ -33,7 +33,7 @@ extern int __compare_and_swap (long int *p, long int oldval, long int newval);
 /* Make sure gcc doesn't try to be clever and move things around on
    us. We need to use _exactly_ the address the user gave us, not some
    alias that contains the same information.  */
-#define __atomic_fool_gcc(x) (*(volatile struct { int a[100]; } *)x)
+#define __atomic_fool_gcc(x) (*(__volatile__ struct { int a[100]; } *)x)
 
 #ifndef ELF_MACHINE_NAME
 

+ 2 - 2
libpthread/linuxthreads/sysdeps/m68k/pspinlock.c

@@ -28,7 +28,7 @@ __pthread_spin_lock (pthread_spinlock_t *lock)
   unsigned int val;
 
   do
-    asm volatile ("tas %1; sne %0"
+    __asm__ __volatile__ ("tas %1; sne %0"
 		  : "=dm" (val), "=m" (*lock)
 		  : "m" (*lock)
 		  : "cc");
@@ -44,7 +44,7 @@ __pthread_spin_trylock (pthread_spinlock_t *lock)
 {
   unsigned int val;
 
-  asm volatile ("tas %1; sne %0"
+  __asm__ __volatile__ ("tas %1; sne %0"
 		: "=dm" (val), "=m" (*lock)
 		: "m" (*lock)
 		: "cc");

+ 2 - 2
libpthread/linuxthreads/sysdeps/mips/pspinlock.c

@@ -31,7 +31,7 @@ __pthread_spin_lock (pthread_spinlock_t *lock)
 {
   unsigned int tmp1, tmp2;
 
-  asm volatile
+  __asm__ __volatile__
     ("\t\t\t# spin_lock\n"
      "1:\n\t"
      ".set	push\n\t"
@@ -66,7 +66,7 @@ weak_alias (__pthread_spin_trylock, pthread_spin_trylock)
 int
 __pthread_spin_unlock (pthread_spinlock_t *lock)
 {
-  asm volatile
+  __asm__ __volatile__
     ("\t\t\t# spin_unlock\n\t"
      "sw	$0,%0"
      : "=m" (*lock)

+ 1 - 1
libpthread/linuxthreads/sysdeps/mips/tls.h

@@ -39,7 +39,7 @@ typedef union dtv
 
 # define READ_THREAD_POINTER() \
     ({ void *__result;							      \
-       asm volatile (".set\tpush\n\t.set\tmips32r2\n\t"			      \
+       __asm__ __volatile__ (".set\tpush\n\t.set\tmips32r2\n\t"			      \
 		     "rdhwr\t%0, $29\n\t.set\tpop" : "=v" (__result));	      \
        __result; })
 

+ 1 - 1
libpthread/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h

@@ -128,7 +128,7 @@ typedef struct
 
 #ifdef __USE_XOPEN2K
 /* POSIX spinlock data type.  */
-typedef volatile int pthread_spinlock_t;
+typedef __volatile__ int pthread_spinlock_t;
 
 /* POSIX barrier. */
 typedef struct {

+ 20 - 20
libpthread/linuxthreads/sysdeps/pthread/pt-initfini.c

@@ -40,16 +40,16 @@
 
 /* We use embedded asm for .section unconditionally, as this makes it
    easier to insert the necessary directives into crtn.S. */
-#define SECTION(x) asm (".section " x )
+#define SECTION(x) __asm__ (".section " x )
 
 /* Embed an #include to pull in the alignment and .end directives. */
-asm ("\n#include \"defs.h\"");
+__asm__ ("\n#include \"defs.h\"");
 
 /* The initial common code ends here. */
-asm ("\n/*@HEADER_ENDS*/");
+__asm__ ("\n/*@HEADER_ENDS*/");
 
 /* To determine whether we need .end and .align: */
-asm ("\n/*@TESTS_BEGIN*/");
+__asm__ ("\n/*@TESTS_BEGIN*/");
 extern void dummy (void (*foo) (void));
 void
 dummy (void (*foo) (void))
@@ -57,10 +57,10 @@ dummy (void (*foo) (void))
   if (foo)
     (*foo) ();
 }
-asm ("\n/*@TESTS_END*/");
+__asm__ ("\n/*@TESTS_END*/");
 
 /* The beginning of _init:  */
-asm ("\n/*@_init_PROLOG_BEGINS*/");
+__asm__ ("\n/*@_init_PROLOG_BEGINS*/");
 
 static void
 call_initialize_minimal (void)
@@ -78,18 +78,18 @@ _init (void)
   /* The very first thing we must do is to set up the registers.  */
   call_initialize_minimal ();
 
-  asm ("ALIGN");
-  asm("END_INIT");
+  __asm__ ("ALIGN");
+  __asm__("END_INIT");
   /* Now the epilog. */
-  asm ("\n/*@_init_PROLOG_ENDS*/");
-  asm ("\n/*@_init_EPILOG_BEGINS*/");
+  __asm__ ("\n/*@_init_PROLOG_ENDS*/");
+  __asm__ ("\n/*@_init_EPILOG_BEGINS*/");
   SECTION(".init");
 }
-asm ("END_INIT");
+__asm__ ("END_INIT");
 
 /* End of the _init epilog, beginning of the _fini prolog. */
-asm ("\n/*@_init_EPILOG_ENDS*/");
-asm ("\n/*@_fini_PROLOG_BEGINS*/");
+__asm__ ("\n/*@_init_EPILOG_ENDS*/");
+__asm__ ("\n/*@_fini_PROLOG_BEGINS*/");
 
 SECTION (".fini");
 extern void _fini (void);
@@ -98,9 +98,9 @@ _fini (void)
 {
 
   /* End of the _fini prolog. */
-  asm ("ALIGN");
-  asm ("END_FINI");
-  asm ("\n/*@_fini_PROLOG_ENDS*/");
+  __asm__ ("ALIGN");
+  __asm__ ("END_FINI");
+  __asm__ ("\n/*@_fini_PROLOG_ENDS*/");
 
   {
     /* Let GCC know that _fini is not a leaf function by having a dummy
@@ -111,14 +111,14 @@ _fini (void)
   }
 
   /* Beginning of the _fini epilog. */
-  asm ("\n/*@_fini_EPILOG_BEGINS*/");
+  __asm__ ("\n/*@_fini_EPILOG_BEGINS*/");
   SECTION (".fini");
 }
-asm ("END_FINI");
+__asm__ ("END_FINI");
 
 /* End of the _fini epilog.  Any further generated assembly (e.g. .ident)
    is shared between both crt files. */
-asm ("\n/*@_fini_EPILOG_ENDS*/");
-asm ("\n/*@TRAILER_BEGINS*/");
+__asm__ ("\n/*@_fini_EPILOG_ENDS*/");
+__asm__ ("\n/*@TRAILER_BEGINS*/");
 
 /* End of file. */

+ 3 - 3
libpthread/linuxthreads/sysdeps/s390/pspinlock.c

@@ -34,7 +34,7 @@
 int
 __pthread_spin_lock (pthread_spinlock_t *lock)
 {
-  asm volatile("    basr  1,0\n"
+  __asm__ __volatile__("    basr  1,0\n"
 	       "0:  slr   0,0\n"
 	       "    cs    0,1,%1\n"
 	       "    jl    0b\n"
@@ -49,7 +49,7 @@ __pthread_spin_trylock (pthread_spinlock_t *lock)
 {
   int oldval;
 
-  asm volatile("    slr   %1,%1\n"
+  __asm__ __volatile__("    slr   %1,%1\n"
 	       "    basr  1,0\n"
 	       "0:  cs    %1,1,%0"
 	       : "=m" (*lock), "=&d" (oldval)
@@ -62,7 +62,7 @@ weak_alias (__pthread_spin_trylock, pthread_spin_trylock)
 int
 __pthread_spin_unlock (pthread_spinlock_t *lock)
 {
-  asm volatile("    xc 0(4,%0),0(%0)\n"
+  __asm__ __volatile__("    xc 0(4,%0),0(%0)\n"
 	       "    bcr 15,0"
 	       : : "a" (lock) : "memory" );
   return 0;

+ 2 - 2
libpthread/linuxthreads/sysdeps/sh/pspinlock.c

@@ -27,7 +27,7 @@ __pthread_spin_lock (pthread_spinlock_t *lock)
   unsigned int val;
 
   do
-    asm volatile ("tas.b @%1; movt %0"
+    __asm__ __volatile__ ("tas.b @%1; movt %0"
 		  : "=r" (val)
 		  : "r" (lock)
 		  : "memory");
@@ -43,7 +43,7 @@ __pthread_spin_trylock (pthread_spinlock_t *lock)
 {
   unsigned int val;
 
-  asm volatile ("tas.b @%1; movt %0"
+  __asm__ __volatile__ ("tas.b @%1; movt %0"
 		: "=r" (val)
 		: "r" (lock)
 		: "memory");

+ 6 - 6
libpthread/linuxthreads/sysdeps/sh/tls.h

@@ -91,7 +91,7 @@ typedef struct
 /* Install new dtv for current thread.  */
 #  define INSTALL_NEW_DTV(dtv) \
   ({ tcbhead_t *__tcbp;							      \
-     __asm __volatile ("stc gbr,%0" : "=r" (__tcbp));			      \
+     __asm__ __volatile__ ("stc gbr,%0" : "=r" (__tcbp));			      \
      __tcbp->dtv = (dtv);})
 
 /* Return dtv of given thread descriptor.  */
@@ -102,25 +102,25 @@ typedef struct
    special attention since 'errno' is not yet available and if the
    operation can cause a failure 'errno' must not be touched.  */
 #  define TLS_INIT_TP(tcbp, secondcall) \
-  ({ __asm __volatile ("ldc %0,gbr" : : "r" (tcbp)); 0; })
+  ({ __asm__ __volatile__ ("ldc %0,gbr" : : "r" (tcbp)); 0; })
 
 /* Return the address of the dtv for the current thread.  */
 #  define THREAD_DTV() \
   ({ tcbhead_t *__tcbp;							      \
-     __asm __volatile ("stc gbr,%0" : "=r" (__tcbp));			      \
+     __asm__ __volatile__ ("stc gbr,%0" : "=r" (__tcbp));			      \
      __tcbp->dtv;})
 
 /* Return the thread descriptor for the current thread.  */
 #  undef THREAD_SELF
 #  define THREAD_SELF \
   ({ struct _pthread_descr_struct *__self;				      \
-     __asm ("stc gbr,%0" : "=r" (__self));				      \
+     __asm__ ("stc gbr,%0" : "=r" (__self));				      \
      __self - 1;})
 
 #  undef INIT_THREAD_SELF
 #  define INIT_THREAD_SELF(descr, nr) \
   ({ struct _pthread_descr_struct *__self = (void *) descr;		      \
-     __asm __volatile ("ldc %0,gbr" : : "r" (__self + 1));		      \
+     __asm__ __volatile__ ("ldc %0,gbr" : : "r" (__self + 1));		      \
      0; })
 
 # define TLS_MULTIPLE_THREADS_IN_TCB 1
@@ -149,7 +149,7 @@ typedef struct
 #  define NONTLS_INIT_TP \
   do { 									\
     static const tcbhead_t nontls_init_tp = { .multiple_threads = 0 };	\
-    __asm __volatile ("ldc %0,gbr" : : "r" (&nontls_init_tp));	        \
+    __asm__ __volatile__ ("ldc %0,gbr" : : "r" (&nontls_init_tp));	        \
   } while (0)
 
 # endif /* __ASSEMBLER__ */

+ 2 - 2
libpthread/linuxthreads/sysdeps/sparc/sparc32/pspinlock.c

@@ -25,7 +25,7 @@
 int
 __pthread_spin_lock (pthread_spinlock_t *lock)
 {
-  asm volatile
+  __asm__ __volatile__
     ("1: ldstub [%0], %%g2\n"
      "   orcc   %%g2, 0x0, %%g0\n"
      "   bne,a  2f\n"
@@ -48,7 +48,7 @@ int
 __pthread_spin_trylock (pthread_spinlock_t *lock)
 {
   int result;
-  asm volatile
+  __asm__ __volatile__
     ("ldstub [%1], %0"
      : "=r" (result)
      : "r" (lock)

+ 3 - 3
libpthread/linuxthreads/sysdeps/sparc/sparc32/sparcv9/pspinlock.c

@@ -26,7 +26,7 @@
 int
 __pthread_spin_lock (pthread_spinlock_t *lock)
 {
-  asm volatile
+  __asm__ __volatile__
     ("1: ldstub  [%0], %%g2\n"
      "   brnz,pn %%g2, 2f\n"
      "    membar #StoreLoad | #StoreStore\n"
@@ -48,7 +48,7 @@ int
 __pthread_spin_trylock (pthread_spinlock_t *lock)
 {
   int result;
-  asm volatile
+  __asm__ __volatile__
     ("ldstub [%1], %0\n"
      "membar #StoreLoad | #StoreStore"
      : "=r" (result)
@@ -62,7 +62,7 @@ weak_alias (__pthread_spin_trylock, pthread_spin_trylock)
 int
 __pthread_spin_unlock (pthread_spinlock_t *lock)
 {
-  asm volatile
+  __asm__ __volatile__
     ("membar #StoreStore | #LoadStore\n"
      "stb    %%g0, [%0]"
      :

+ 3 - 3
libpthread/linuxthreads/sysdeps/sparc/sparc64/pspinlock.c

@@ -25,7 +25,7 @@
 int
 __pthread_spin_lock (pthread_spinlock_t *lock)
 {
-  asm volatile
+  __asm__ __volatile__
     ("1: ldstub  [%0], %%g5\n"
      "   brnz,pn %%g5, 2f\n"
      "    membar #StoreLoad | #StoreStore\n"
@@ -47,7 +47,7 @@ int
 __pthread_spin_trylock (pthread_spinlock_t *lock)
 {
   int result;
-  asm volatile
+  __asm__ __volatile__
     ("ldstub [%1], %0\n"
      "membar #StoreLoad | #StoreStore"
      : "=r" (result)
@@ -61,7 +61,7 @@ weak_alias (__pthread_spin_trylock, pthread_spin_trylock)
 int
 __pthread_spin_unlock (pthread_spinlock_t *lock)
 {
-  asm volatile
+  __asm__ __volatile__
     ("membar #StoreStore | #LoadStore\n"
      "stb    %%g0, [%0]"
      :

+ 1 - 1
libpthread/linuxthreads/sysdeps/unix/sysv/linux/mq_notify.c

@@ -87,7 +87,7 @@ notification_function (void *arg)
 {
   /* Copy the function and parameter so that the parent thread can go
      on with its life.  */
-  volatile union notify_data *data = (volatile union notify_data *) arg;
+  __volatile__ union notify_data *data = (__volatile__ union notify_data *) arg;
   void (*fct) (union sigval) = data->fct;
   union sigval param = data->param;
 

+ 1 - 1
libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/fork.h

@@ -24,7 +24,7 @@
   register long __o0 __asm__ ("o0");					\
   register long __o1 __asm__ ("o1");					\
   register long __g1 __asm__ ("g1") = __NR_fork;			\
-  __asm __volatile (__SYSCALL_STRING					\
+  __asm__ __volatile__ (__SYSCALL_STRING					\
 		    : "=r" (__g1), "=r" (__o0), "=r" (__o1)		\
 		    : "0" (__g1)					\
 		    : __SYSCALL_CLOBBERS);				\

+ 3 - 3
libpthread/linuxthreads/sysdeps/x86_64/pspinlock.c

@@ -33,7 +33,7 @@
 int
 __pthread_spin_lock (pthread_spinlock_t *lock)
 {
-  asm volatile
+  __asm__ __volatile__
     ("\n"
      "1:\n\t"
      "lock; decl %0\n\t"
@@ -56,7 +56,7 @@ __pthread_spin_trylock (pthread_spinlock_t *lock)
 {
   int oldval;
 
-  asm volatile
+  __asm__ __volatile__
     ("xchgl %0,%1"
      : "=r" (oldval), "=m" (*lock)
      : "0" (0));
@@ -68,7 +68,7 @@ weak_alias (__pthread_spin_trylock, pthread_spin_trylock)
 int
 __pthread_spin_unlock (pthread_spinlock_t *lock)
 {
-  asm volatile
+  __asm__ __volatile__
     ("movl $1,%0"
      : "=m" (*lock));
   return 0;

+ 1 - 1
libpthread/linuxthreads/sysdeps/x86_64/tls.h

@@ -108,7 +108,7 @@ typedef struct
     /* For now the thread descriptor is at the same address.  */	      \
     head->self = _descr;						      \
 									      \
-    asm volatile ("syscall"						      \
+    __asm__ __volatile__ ("syscall"						      \
 		  : "=a" (_result)					      \
 		  : "0" ((unsigned long int) __NR_arch_prctl),		      \
 		    "D" ((unsigned long int) ARCH_SET_FS),		      \