mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-24 18:23:41 +08:00
m68k: fix 64bit atomic ops
This commit is contained in:
parent
efeca5dac6
commit
64ae9fe456
@ -1,3 +1,10 @@
|
||||
2017-02-01 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* sysdeps/m68k/m680x0/m68020/atomic-machine.h
|
||||
(__arch_compare_and_exchange_val_64_acq, atomic_exchange_acq)
|
||||
(atomic_exchange_and_add, atomic_add): Add casts to 64 bit asm
|
||||
operands.
|
||||
|
||||
2017-01-31 Chung-Lin Tang <cltang@codesourcery.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/nios2/ipc_priv.h: New file.
|
||||
|
@ -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"); \
|
||||
} \
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user