From 45819cbca186a7d04889e3d1fc469c2780b28a0e Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 25 Jan 2015 22:09:05 +0100 Subject: [PATCH] m68k/coldfire: avoid warning about volatile register variables --- ChangeLog | 4 ++++ sysdeps/unix/sysv/linux/m68k/coldfire/bits/atomic.h | 19 +++++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index dcab5e0032..57f9f99b9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2015-01-25 Andreas Schwab + * sysdeps/unix/sysv/linux/m68k/coldfire/bits/atomic.h + (atomic_compare_and_exchange_val_acq): Use uint32_t for the + register variables. + * sysdeps/m68k/m680x0/fpu/fraiseexcpt.c (__feraiseexcept): Use libm_hidden_def. diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/bits/atomic.h b/sysdeps/unix/sysv/linux/m68k/coldfire/bits/atomic.h index 8454a8cf26..6e069edabe 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/bits/atomic.h +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/bits/atomic.h @@ -50,9 +50,9 @@ typedef uintmax_t uatomic_max_t; __typeof (mem) _mem = mem; \ __typeof (oldval) _oldval = oldval; \ __typeof (newval) _newval = newval; \ - register __typeof (mem) _a0 asm ("a0") = _mem; \ - register __typeof (oldval) _d0 asm ("d0") = _oldval; \ - register __typeof (newval) _d1 asm ("d1") = _newval; \ + register uint32_t *_a0 asm ("a0") = (uint32_t *) _mem; \ + register uint32_t _d0 asm ("d0") = (uint32_t) _oldval; \ + register uint32_t _d1 asm ("d1") = (uint32_t) _newval; \ void *tmp; \ \ asm ("movel #_GLOBAL_OFFSET_TABLE_@GOTPC, %2\n\t" \ @@ -63,7 +63,7 @@ typedef uintmax_t uatomic_max_t; "jsr (%2)\n\t" \ : "+d" (_d0), "+m" (*_a0), "=&a" (tmp) \ : "a" (_a0), "d" (_d1)); \ - _d0; \ + (__typeof (oldval)) _d0; \ }) #else # define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ @@ -73,16 +73,15 @@ typedef uintmax_t uatomic_max_t; __typeof (mem) _mem = mem; \ __typeof (oldval) _oldval = oldval; \ __typeof (newval) _newval = newval; \ - register __typeof (oldval) _d0 asm ("d0") \ - = (__typeof (oldval)) SYS_ify (atomic_cmpxchg_32); \ - register __typeof (mem) _a0 asm ("a0") = _mem; \ - register __typeof (oldval) _d2 asm ("d2") = _oldval; \ - register __typeof (newval) _d1 asm ("d1") = _newval; \ + register uint32_t _d0 asm ("d0") = SYS_ify (atomic_cmpxchg_32); \ + register uint32_t *_a0 asm ("a0") = (uint32_t *) _mem; \ + register uint32_t _d2 asm ("d2") = (uint32_t) _oldval; \ + register uint32_t _d1 asm ("d1") = (uint32_t) _newval; \ \ asm ("trap #0" \ : "+d" (_d0), "+m" (*_a0) \ : "a" (_a0), "d" (_d2), "d" (_d1)); \ - _d0; \ + (__typeof (oldval)) _d0; \ }) #endif -- 2.11.4.GIT