Go to the source code of this file.
◆ AO_HAVE_compare_and_swap_full
| #define AO_HAVE_compare_and_swap_full |
◆ AO_HAVE_fetch_compare_and_swap_full
| #define AO_HAVE_fetch_compare_and_swap_full |
◆ AO_compare_and_swap_full()
Definition at line 53 of file s390.h.
55{
57 __asm__ __volatile__ (
58# ifndef __s390x__
59 " cs %1,%2,0(%3)\n"
60# else
61 " csg %1,%2,0(%3)\n"
62# endif
63 " ipm %0\n"
64 " srl %0,28\n"
65 :
"=&d" (
retval),
"+d" (old)
66 : "d" (new_val), "a" (addr)
67 : "cc", "memory");
69}
◆ AO_fetch_compare_and_swap_full()
Definition at line 74 of file s390.h.
76{
77 __asm__ __volatile__ (
78# ifndef __s390x__
79 " cs %0,%2,%1\n"
80# else
81 " csg %0,%2,%1\n"
82# endif
83 : "+d" (old), "=Q" (*addr)
84 : "d" (new_val), "m" (*addr)
85 : "cc", "memory");
86 return old;
87}