diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2010-06-24 15:10:48 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2010-06-24 15:10:48 +0200 |
commit | 1dc2afe522b1c6d23c4d16b23e083cc38c69da55 (patch) | |
tree | 9d7e6a83cb9714c3147bce7accfd0642fa5c2581 /libpthread/nptl | |
parent | 59f3d4df3b644583311e89e84cc3fbae6aec8b32 (diff) |
use uniform form of C99 keywords
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libpthread/nptl')
29 files changed, 159 insertions, 159 deletions
diff --git a/libpthread/nptl/init.c b/libpthread/nptl/init.c index 3e5fde337..911293a65 100644 --- a/libpthread/nptl/init.c +++ b/libpthread/nptl/init.c @@ -275,7 +275,7 @@ __pthread_initialize_minimal_internal (void) following code ahead of the __libc_setup_tls call. This function will initialize the thread register which is subsequently used. */ - __asm __volatile (""); + __asm__ __volatile__ (""); #endif /* Minimal initialization of the thread descriptor. */ diff --git a/libpthread/nptl/sysdeps/i386/i686/tls.h b/libpthread/nptl/sysdeps/i386/i686/tls.h index 4025ed8d2..928d269dc 100644 --- a/libpthread/nptl/sysdeps/i386/i686/tls.h +++ b/libpthread/nptl/sysdeps/i386/i686/tls.h @@ -25,9 +25,9 @@ /* Macros to load from and store into segment registers. We can use the 32-bit instructions. */ #define TLS_GET_GS() \ - ({ int __seg; __asm ("movl %%gs, %0" : "=q" (__seg)); __seg; }) + ({ int __seg; __asm__ ("movl %%gs, %0" : "=q" (__seg)); __seg; }) #define TLS_SET_GS(val) \ - __asm ("movl %0, %%gs" :: "q" (val)) + __asm__ ("movl %0, %%gs" :: "q" (val)) /* Get the full set of definitions. */ diff --git a/libpthread/nptl/sysdeps/i386/pthreaddef.h b/libpthread/nptl/sysdeps/i386/pthreaddef.h index 81456a4fc..f9f5645dc 100644 --- a/libpthread/nptl/sysdeps/i386/pthreaddef.h +++ b/libpthread/nptl/sysdeps/i386/pthreaddef.h @@ -41,8 +41,8 @@ #define __exit_thread_inline(val) \ while (1) { \ if (__builtin_constant_p (val) && (val) == 0) \ - __asm__ volatile ("xorl %%ebx, %%ebx; int $0x80" :: "a" (__NR_exit)); \ + __asm__ __volatile__ ("xorl %%ebx, %%ebx; int $0x80" :: "a" (__NR_exit)); \ else \ - __asm__ volatile ("movl %1, %%ebx; int $0x80" \ + __asm__ __volatile__ ("movl %1, %%ebx; int $0x80" \ :: "a" (__NR_exit), "r" (val)); \ } diff --git a/libpthread/nptl/sysdeps/i386/tls.h b/libpthread/nptl/sysdeps/i386/tls.h index 5f27d8fec..ac547953a 100644 --- a/libpthread/nptl/sysdeps/i386/tls.h +++ b/libpthread/nptl/sysdeps/i386/tls.h @@ -232,7 +232,7 @@ union user_desc_init _segdescr.vals[3] = 0x51; \ \ /* Install the TLS. */ \ - __asm__ volatile (TLS_LOAD_EBX \ + __asm__ __volatile__ (TLS_LOAD_EBX \ "int $0x80\n\t" \ TLS_LOAD_EBX \ : "=a" (_result), "=m" (_segdescr.desc.entry_number) \ @@ -262,7 +262,7 @@ union user_desc_init /* Return the thread descriptor for the current thread. - The contained asm must *not* be marked volatile since otherwise + The contained asm must *not* be marked __volatile__ since otherwise assignments like pthread_descr self = thread_self(); do not get optimized away. */ @@ -282,11 +282,11 @@ union user_desc_init # define THREAD_GETMEM(descr, member) \ ({ __typeof (descr->member) __value; \ if (sizeof (__value) == 1) \ - __asm__ volatile ("movb %%gs:%P2,%b0" \ + __asm__ __volatile__ ("movb %%gs:%P2,%b0" \ : "=q" (__value) \ : "0" (0), "i" (offsetof (struct pthread, member))); \ else if (sizeof (__value) == 4) \ - __asm__ volatile ("movl %%gs:%P1,%0" \ + __asm__ __volatile__ ("movl %%gs:%P1,%0" \ : "=r" (__value) \ : "i" (offsetof (struct pthread, member))); \ else \ @@ -296,7 +296,7 @@ union user_desc_init 4 or 8. */ \ abort (); \ \ - __asm__ volatile ("movl %%gs:%P1,%%eax\n\t" \ + __asm__ __volatile__ ("movl %%gs:%P1,%%eax\n\t" \ "movl %%gs:%P2,%%edx" \ : "=A" (__value) \ : "i" (offsetof (struct pthread, member)), \ @@ -309,12 +309,12 @@ union user_desc_init # define THREAD_GETMEM_NC(descr, member, idx) \ ({ __typeof (descr->member[0]) __value; \ if (sizeof (__value) == 1) \ - __asm__ volatile ("movb %%gs:%P2(%3),%b0" \ + __asm__ __volatile__ ("movb %%gs:%P2(%3),%b0" \ : "=q" (__value) \ : "0" (0), "i" (offsetof (struct pthread, member[0])), \ "r" (idx)); \ else if (sizeof (__value) == 4) \ - __asm__ volatile ("movl %%gs:%P1(,%2,4),%0" \ + __asm__ __volatile__ ("movl %%gs:%P1(,%2,4),%0" \ : "=r" (__value) \ : "i" (offsetof (struct pthread, member[0])), \ "r" (idx)); \ @@ -325,7 +325,7 @@ union user_desc_init 4 or 8. */ \ abort (); \ \ - __asm__ volatile ("movl %%gs:%P1(,%2,8),%%eax\n\t" \ + __asm__ __volatile__ ("movl %%gs:%P1(,%2,8),%%eax\n\t" \ "movl %%gs:4+%P1(,%2,8),%%edx" \ : "=&A" (__value) \ : "i" (offsetof (struct pthread, member[0])), \ @@ -337,11 +337,11 @@ union user_desc_init /* Same as THREAD_SETMEM, but the member offset can be non-constant. */ # define THREAD_SETMEM(descr, member, value) \ ({ if (sizeof (descr->member) == 1) \ - __asm__ volatile ("movb %b0,%%gs:%P1" : \ + __asm__ __volatile__ ("movb %b0,%%gs:%P1" : \ : "iq" (value), \ "i" (offsetof (struct pthread, member))); \ else if (sizeof (descr->member) == 4) \ - __asm__ volatile ("movl %0,%%gs:%P1" : \ + __asm__ __volatile__ ("movl %0,%%gs:%P1" : \ : "ir" (value), \ "i" (offsetof (struct pthread, member))); \ else \ @@ -351,7 +351,7 @@ union user_desc_init 4 or 8. */ \ abort (); \ \ - __asm__ volatile ("movl %%eax,%%gs:%P1\n\t" \ + __asm__ __volatile__ ("movl %%eax,%%gs:%P1\n\t" \ "movl %%edx,%%gs:%P2" : \ : "A" (value), \ "i" (offsetof (struct pthread, member)), \ @@ -362,12 +362,12 @@ union user_desc_init /* Set member of the thread descriptor directly. */ # define THREAD_SETMEM_NC(descr, member, idx, value) \ ({ if (sizeof (descr->member[0]) == 1) \ - __asm__ volatile ("movb %b0,%%gs:%P1(%2)" : \ + __asm__ __volatile__ ("movb %b0,%%gs:%P1(%2)" : \ : "iq" (value), \ "i" (offsetof (struct pthread, member)), \ "r" (idx)); \ else if (sizeof (descr->member[0]) == 4) \ - __asm__ volatile ("movl %0,%%gs:%P1(,%2,4)" : \ + __asm__ __volatile__ ("movl %0,%%gs:%P1(,%2,4)" : \ : "ir" (value), \ "i" (offsetof (struct pthread, member)), \ "r" (idx)); \ @@ -378,7 +378,7 @@ union user_desc_init 4 or 8. */ \ abort (); \ \ - __asm__ volatile ("movl %%eax,%%gs:%P1(,%2,8)\n\t" \ + __asm__ __volatile__ ("movl %%eax,%%gs:%P1(,%2,8)\n\t" \ "movl %%edx,%%gs:4+%P1(,%2,8)" : \ : "A" (value), \ "i" (offsetof (struct pthread, member)), \ @@ -391,7 +391,7 @@ union user_desc_init ({ __typeof (descr->member) __ret; \ __typeof (oldval) __old = (oldval); \ if (sizeof (descr->member) == 4) \ - __asm__ volatile (LOCK_PREFIX "cmpxchgl %2, %%gs:%P3" \ + __asm__ __volatile__ (LOCK_PREFIX "cmpxchgl %2, %%gs:%P3" \ : "=a" (__ret) \ : "0" (__old), "r" (newval), \ "i" (offsetof (struct pthread, member))); \ @@ -404,7 +404,7 @@ union user_desc_init /* Atomic logical and. */ #define THREAD_ATOMIC_AND(descr, member, val) \ (void) ({ if (sizeof ((descr)->member) == 4) \ - __asm__ volatile (LOCK_PREFIX "andl %1, %%gs:%P0" \ + __asm__ __volatile__ (LOCK_PREFIX "andl %1, %%gs:%P0" \ :: "i" (offsetof (struct pthread, member)), \ "ir" (val)); \ else \ @@ -415,7 +415,7 @@ union user_desc_init /* Atomic set bit. */ #define THREAD_ATOMIC_BIT_SET(descr, member, bit) \ (void) ({ if (sizeof ((descr)->member) == 4) \ - __asm__ volatile (LOCK_PREFIX "orl %1, %%gs:%P0" \ + __asm__ __volatile__ (LOCK_PREFIX "orl %1, %%gs:%P0" \ :: "i" (offsetof (struct pthread, member)), \ "ir" (1 << (bit))); \ else \ @@ -427,7 +427,7 @@ union user_desc_init #define CALL_THREAD_FCT(descr) \ ({ void *__res; \ int __ignore1, __ignore2; \ - __asm__ volatile ("pushl %%eax\n\t" \ + __asm__ __volatile__ ("pushl %%eax\n\t" \ "pushl %%eax\n\t" \ "pushl %%eax\n\t" \ "pushl %%gs:%P4\n\t" \ @@ -462,7 +462,7 @@ union user_desc_init #define THREAD_GSCOPE_RESET_FLAG() \ do \ { int __res; \ - __asm__ volatile ("xchgl %0, %%gs:%P1" \ + __asm__ __volatile__ ("xchgl %0, %%gs:%P1" \ : "=r" (__res) \ : "i" (offsetof (struct pthread, header.gscope_flag)), \ "0" (THREAD_GSCOPE_FLAG_UNUSED)); \ diff --git a/libpthread/nptl/sysdeps/pthread/pt-initfini.c b/libpthread/nptl/sysdeps/pthread/pt-initfini.c index b26a50456..1f81144d0 100644 --- a/libpthread/nptl/sysdeps/pthread/pt-initfini.c +++ b/libpthread/nptl/sysdeps/pthread/pt-initfini.c @@ -43,13 +43,13 @@ #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) @@ -79,18 +79,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 __attribute__ ((section (".fini"))) _fini (void); @@ -99,9 +99,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 @@ -112,14 +112,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. */ diff --git a/libpthread/nptl/sysdeps/pthread/unwind-forcedunwind.c b/libpthread/nptl/sysdeps/pthread/unwind-forcedunwind.c index 273c8bb3f..40b8d98c9 100644 --- a/libpthread/nptl/sysdeps/pthread/unwind-forcedunwind.c +++ b/libpthread/nptl/sysdeps/pthread/unwind-forcedunwind.c @@ -50,7 +50,7 @@ pthread_cancel_init (void) if (__builtin_expect (libgcc_s_handle != NULL, 1)) { /* Force gcc to reload all values. */ - __asm__ volatile ("" ::: "memory"); + __asm__ __volatile__ ("" ::: "memory"); return; } diff --git a/libpthread/nptl/sysdeps/sh/pthread_spin_lock.c b/libpthread/nptl/sysdeps/sh/pthread_spin_lock.c index 2c72eb610..74fad3388 100644 --- a/libpthread/nptl/sysdeps/sh/pthread_spin_lock.c +++ b/libpthread/nptl/sysdeps/sh/pthread_spin_lock.c @@ -24,7 +24,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"); diff --git a/libpthread/nptl/sysdeps/sh/pthreaddef.h b/libpthread/nptl/sysdeps/sh/pthreaddef.h index c1902fb54..dc6a4f907 100644 --- a/libpthread/nptl/sysdeps/sh/pthreaddef.h +++ b/libpthread/nptl/sysdeps/sh/pthreaddef.h @@ -41,9 +41,9 @@ #define __exit_thread_inline(val) \ while (1) { \ if (__builtin_constant_p (val) && (val) == 0) \ - __asm__ volatile ("mov #0,r4; mov %0,r3; trapa #0x11\n\t" SYSCALL_INST_PAD \ + __asm__ __volatile__ ("mov #0,r4; mov %0,r3; trapa #0x11\n\t" SYSCALL_INST_PAD \ :: "i" (__NR_exit)); \ else \ - __asm__ volatile ("mov %1,r4; mov %0,r3; trapa #0x11\n\t" SYSCALL_INST_PAD \ + __asm__ __volatile__ ("mov %1,r4; mov %0,r3; trapa #0x11\n\t" SYSCALL_INST_PAD \ :: "i" (__NR_exit), "r" (val)); \ } diff --git a/libpthread/nptl/sysdeps/sh/tls.h b/libpthread/nptl/sysdeps/sh/tls.h index 2c538eded..bbb11187a 100644 --- a/libpthread/nptl/sysdeps/sh/tls.h +++ b/libpthread/nptl/sysdeps/sh/tls.h @@ -94,7 +94,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. */ @@ -105,12 +105,12 @@ 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. @@ -120,7 +120,7 @@ typedef struct do not get optimized away. */ # define THREAD_SELF \ ({ struct pthread *__self; \ - __asm ("stc gbr,%0" : "=r" (__self)); \ + __asm__ ("stc gbr,%0" : "=r" (__self)); \ __self - 1;}) /* Magic for libthread_db to know how to do THREAD_SELF. */ @@ -143,15 +143,15 @@ typedef struct #define THREAD_GET_POINTER_GUARD() \ ({ tcbhead_t *__tcbp; \ - __asm __volatile ("stc gbr,%0" : "=r" (__tcbp)); \ + __asm__ __volatile__ ("stc gbr,%0" : "=r" (__tcbp)); \ __tcbp->pointer_guard;}) #define THREAD_SET_POINTER_GUARD(value) \ ({ tcbhead_t *__tcbp; \ - __asm __volatile ("stc gbr,%0" : "=r" (__tcbp)); \ + __asm__ __volatile__ ("stc gbr,%0" : "=r" (__tcbp)); \ __tcbp->pointer_guard = (value);}) #define THREAD_COPY_POINTER_GUARD(descr) \ ({ tcbhead_t *__tcbp; \ - __asm __volatile ("stc gbr,%0" : "=r" (__tcbp)); \ + __asm__ __volatile__ ("stc gbr,%0" : "=r" (__tcbp)); \ ((tcbhead_t *) (descr + 1))->pointer_guard = __tcbp->pointer_guard;}) /* Get and set the global scope generation counter in struct pthread. */ diff --git a/libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.c b/libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.c index d3c6e3049..c263bb7c8 100644 --- a/libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.c +++ b/libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.c @@ -22,7 +22,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" diff --git a/libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_trylock.c b/libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_trylock.c index bcc3158fd..2994085ab 100644 --- a/libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_trylock.c +++ b/libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_trylock.c @@ -24,6 +24,6 @@ int pthread_spin_trylock (pthread_spinlock_t *lock) { int res; - __asm __volatile ("ldstub [%1], %0" : "=r" (res) : "r" (lock) : "memory"); + __asm__ __volatile__ ("ldstub [%1], %0" : "=r" (res) : "r" (lock) : "memory"); return res == 0 ? 0 : EBUSY; } diff --git a/libpthread/nptl/sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c b/libpthread/nptl/sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c index 8880f535b..0e18621e6 100644 --- a/libpthread/nptl/sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c +++ b/libpthread/nptl/sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c @@ -22,7 +22,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" diff --git a/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.c b/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.c index 77171d9b9..53a3eab04 100644 --- a/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.c +++ b/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.c @@ -22,7 +22,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" diff --git a/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_trylock.c b/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_trylock.c index 2bda809da..a8ef1c216 100644 --- a/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_trylock.c +++ b/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_trylock.c @@ -24,7 +24,7 @@ int pthread_spin_trylock (pthread_spinlock_t *lock) { int res; - __asm __volatile + __asm__ __volatile ("ldstub [%1], %0\n" "membar #StoreLoad | #StoreStore" : "=r" (res) diff --git a/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_unlock.c b/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_unlock.c index 7037675a2..25a8888da 100644 --- a/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_unlock.c +++ b/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_unlock.c @@ -24,7 +24,7 @@ int pthread_spin_unlock (pthread_spinlock_t *lock) { - __asm __volatile ("membar #StoreStore | #LoadStore"); + __asm__ __volatile__ ("membar #StoreStore | #LoadStore"); *lock = 0; return 0; } diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pthread_once.c b/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pthread_once.c index 8adf8b44e..86b062804 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pthread_once.c +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pthread_once.c @@ -49,7 +49,7 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void)) Do this atomically. */ newval = __fork_generation | 1; - __asm __volatile ( + __asm__ __volatile__ ( "1: ldl_l %0, %2\n" " and %0, 2, %1\n" " bne %1, 2f\n" diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/bits/atomic.h b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/bits/atomic.h index b0586ea1e..8f63e2510 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/bits/atomic.h +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/bits/atomic.h @@ -72,11 +72,11 @@ void __arm_link_error (void); /* Thumb-2 has ldrex/strex. However it does not have barrier instructions, so we still need to use the kernel helper. */ #define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ - ({ register __typeof (oldval) a_oldval asm ("r0"); \ - register __typeof (oldval) a_newval asm ("r1") = (newval); \ - register __typeof (mem) a_ptr asm ("r2") = (mem); \ - register __typeof (oldval) a_tmp asm ("r3"); \ - register __typeof (oldval) a_oldval2 asm ("r4") = (oldval); \ + ({ register __typeof (oldval) a_oldval __asm__ ("r0"); \ + register __typeof (oldval) a_newval __asm__ ("r1") = (newval); \ + register __typeof (mem) a_ptr __asm__ ("r2") = (mem); \ + register __typeof (oldval) a_tmp __asm__ ("r3"); \ + register __typeof (oldval) a_oldval2 __asm__ ("r4") = (oldval); \ __asm__ __volatile__ \ ("0:\tldr\t%[tmp],[%[ptr]]\n\t" \ "cmp\t%[tmp], %[old2]\n\t" \ @@ -95,11 +95,11 @@ void __arm_link_error (void); a_tmp; }) #else #define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ - ({ register __typeof (oldval) a_oldval asm ("r0"); \ - register __typeof (oldval) a_newval asm ("r1") = (newval); \ - register __typeof (mem) a_ptr asm ("r2") = (mem); \ - register __typeof (oldval) a_tmp asm ("r3"); \ - register __typeof (oldval) a_oldval2 asm ("r4") = (oldval); \ + ({ register __typeof (oldval) a_oldval __asm__ ("r0"); \ + register __typeof (oldval) a_newval __asm__ ("r1") = (newval); \ + register __typeof (mem) a_ptr __asm__ ("r2") = (mem); \ + register __typeof (oldval) a_tmp __asm__ ("r3"); \ + register __typeof (oldval) a_oldval2 __asm__ ("r4") = (oldval); \ __asm__ __volatile__ \ ("0:\tldr\t%[tmp],[%[ptr]]\n\t" \ "cmp\t%[tmp], %[old2]\n\t" \ diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c index 011746d0e..b6253dd6b 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c @@ -40,7 +40,7 @@ pthread_cancel_init (void) if (__builtin_expect (libgcc_s_handle != NULL, 1)) { /* Force gcc to reload all values. */ - asm volatile ("" ::: "memory"); + __asm__ __volatile__ ("" ::: "memory"); return; } @@ -85,7 +85,7 @@ __unwind_freeres (void) ARM unwinder relies on register state at entrance. So we write this in assembly. */ -asm ( +__asm__ ( " .globl _Unwind_Resume\n" " .type _Unwind_Resume, %function\n" "_Unwind_Resume:\n" diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c index cdab10e30..afafcdacf 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c @@ -48,7 +48,7 @@ init (void) ARM unwinder relies on register state at entrance. So we write this in assembly. */ -asm ( +__asm__ ( " .globl _Unwind_Resume\n" " .type _Unwind_Resume, %function\n" "_Unwind_Resume:\n" diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h index a40d84e75..ab1a9395e 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h @@ -210,7 +210,7 @@ LLL_STUB_UNWIND_INFO_END ({ \ int __status; \ register __typeof (val) _val __asm__ ("edx") = (val); \ - __asm__ __volatile (LLL_EBX_LOAD \ + __asm__ __volatile__ (LLL_EBX_LOAD \ LLL_ENTER_KERNEL \ LLL_EBX_LOAD \ : "=a" (__status) \ @@ -226,7 +226,7 @@ LLL_STUB_UNWIND_INFO_END do { \ int __ignore; \ register __typeof (nr) _nr __asm__ ("edx") = (nr); \ - __asm__ __volatile (LLL_EBX_LOAD \ + __asm__ __volatile__ (LLL_EBX_LOAD \ LLL_ENTER_KERNEL \ LLL_EBX_LOAD \ : "=a" (__ignore) \ @@ -254,7 +254,7 @@ LLL_STUB_UNWIND_INFO_END #define lll_trylock(futex) \ ({ int ret; \ - __asm__ __volatile (__lll_trylock_asm \ + __asm__ __volatile__ (__lll_trylock_asm \ : "=a" (ret), "=m" (futex) \ : "r" (LLL_LOCK_INITIALIZER_LOCKED), "m" (futex), \ "0" (LLL_LOCK_INITIALIZER), \ @@ -264,7 +264,7 @@ LLL_STUB_UNWIND_INFO_END #define lll_robust_trylock(futex, id) \ ({ int ret; \ - __asm__ __volatile (LOCK_INSTR "cmpxchgl %2, %1" \ + __asm__ __volatile__ (LOCK_INSTR "cmpxchgl %2, %1" \ : "=a" (ret), "=m" (futex) \ : "r" (id), "m" (futex), \ "0" (LLL_LOCK_INITIALIZER) \ @@ -274,7 +274,7 @@ LLL_STUB_UNWIND_INFO_END #define lll_cond_trylock(futex) \ ({ int ret; \ - __asm__ __volatile (LOCK_INSTR "cmpxchgl %2, %1" \ + __asm__ __volatile__ (LOCK_INSTR "cmpxchgl %2, %1" \ : "=a" (ret), "=m" (futex) \ : "r" (LLL_LOCK_INITIALIZER_WAITERS), \ "m" (futex), "0" (LLL_LOCK_INITIALIZER) \ @@ -294,7 +294,7 @@ LLL_STUB_UNWIND_INFO_END (void) \ ({ int ignore1, ignore2; \ if (__builtin_constant_p (private) && (private) == LLL_PRIVATE) \ - __asm__ __volatile (__lll_lock_asm_start \ + __asm__ __volatile__ (__lll_lock_asm_start \ "jnz _L_lock_%=\n\t" \ ".subsection 1\n\t" \ ".type _L_lock_%=,@function\n" \ @@ -313,7 +313,7 @@ LLL_STUB_UNWIND_INFO_END else \ { \ int ignore3; \ - __asm__ __volatile (__lll_lock_asm_start \ + __asm__ __volatile__ (__lll_lock_asm_start \ "jnz _L_lock_%=\n\t" \ ".subsection 1\n\t" \ ".type _L_lock_%=,@function\n" \ @@ -337,7 +337,7 @@ LLL_STUB_UNWIND_INFO_END #define lll_robust_lock(futex, id, private) \ ({ int __result, ignore1, ignore2; \ - |