diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2017-02-01 01:30:24 +0100 |
---|---|---|
committer | Andreas Schwab <schwab@linux-m68k.org> | 2017-02-01 01:32:31 +0100 |
commit | 64ae9fe45662c8994b0e56ab469b01967408a154 (patch) | |
tree | e14d8b9a083b53dd38ba1dea2fbc518fb290980f /sysdeps/m68k | |
parent | efeca5dac690aafe7b921c6523eba86b9fbde9fe (diff) | |
download | glibc-64ae9fe45662c8994b0e56ab469b01967408a154.tar.gz glibc-64ae9fe45662c8994b0e56ab469b01967408a154.tar.xz glibc-64ae9fe45662c8994b0e56ab469b01967408a154.zip |
m68k: fix 64bit atomic ops
Diffstat (limited to 'sysdeps/m68k')
-rw-r--r-- | sysdeps/m68k/m680x0/m68020/atomic-machine.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sysdeps/m68k/m680x0/m68020/atomic-machine.h b/sysdeps/m68k/m680x0/m68020/atomic-machine.h index 5c37d86ce8..00dc22d79d 100644 --- a/sysdeps/m68k/m680x0/m68020/atomic-machine.h +++ b/sysdeps/m68k/m680x0/m68020/atomic-machine.h @@ -73,7 +73,7 @@ typedef uintmax_t uatomic_max_t; __typeof (mem) __memp = (mem); \ __asm __volatile ("cas2%.l %0:%R0,%1:%R1,(%2):(%3)" \ : "=d" (__ret) \ - : "d" (newval), "r" (__memp), \ + : "d" ((__typeof (*(mem))) (newval)), "r" (__memp), \ "r" ((char *) __memp + 4), "0" (oldval) \ : "memory"); \ __ret; }) @@ -101,8 +101,9 @@ typedef uintmax_t uatomic_max_t; __asm __volatile ("1: cas2%.l %0:%R0,%1:%R1,(%2):(%3);" \ " jbne 1b" \ : "=d" (__result) \ - : "d" (newvalue), "r" (__memp), \ - "r" ((char *) __memp + 4), "0" (__result) \ + : "d" ((__typeof (*(mem))) (newvalue)), \ + "r" (__memp), "r" ((char *) __memp + 4), \ + "0" (__result) \ : "memory"); \ } \ __result; }) @@ -144,7 +145,7 @@ typedef uintmax_t uatomic_max_t; " cas2%.l %0:%R0,%1:%R1,(%3):(%4);" \ " jbne 1b" \ : "=d" (__result), "=&d" (__temp) \ - : "d" (value), "r" (__memp), \ + : "d" ((__typeof (*(mem))) (value)), "r" (__memp), \ "r" ((char *) __memp + 4), "0" (__result) \ : "memory"); \ } \ @@ -175,8 +176,9 @@ typedef uintmax_t uatomic_max_t; " cas2%.l %0:%R0,%1:%R1,(%3):(%4);" \ " jbne 1b" \ : "=d" (__oldval), "=&d" (__temp) \ - : "d" (value), "r" (__memp), \ - "r" ((char *) __memp + 4), "0" (__oldval) \ + : "d" ((__typeof (*(mem))) (value)), \ + "r" (__memp), "r" ((char *) __memp + 4), \ + "0" (__oldval) \ : "memory"); \ } \ }) |