Ticket #12804: atomic.hpp.diff

File atomic.hpp.diff, 1.7 KB (added by dima.ru.com@…, 5 years ago)

boost/interprocess/detail/atomic.hpp patch

Line 
1*** atomic.hpp Tue Aug 8 18:57:58 2017
2--- atomic.hpp.orig Sun Apr 16 20:22:21 2017
3***************
4*** 218,228 ****
5 {
6 boost::uint32_t prev, temp;
7
8! asm volatile ("L1.%=:\n\t"
9 "lwarx %0,0,%2\n\t"
10 "add %1,%0,%3\n\t"
11 "stwcx. %1,0,%2\n\t"
12! "bne- L1.%="
13 : "=&r" (prev), "=&r" (temp)
14 : "b" (mem), "r" (val)
15 : "cc", "memory");
16--- 218,228 ----
17 {
18 boost::uint32_t prev, temp;
19
20! asm volatile ("1:\n\t"
21 "lwarx %0,0,%2\n\t"
22 "add %1,%0,%3\n\t"
23 "stwcx. %1,0,%2\n\t"
24! "bne- 1b"
25 : "=&r" (prev), "=&r" (temp)
26 : "b" (mem), "r" (val)
27 : "cc", "memory");
28***************
29*** 240,252 ****
30 {
31 boost::uint32_t prev;
32
33! asm volatile ("L1.%=:\n\t"
34 "lwarx %0,0,%1\n\t"
35 "cmpw %0,%3\n\t"
36! "bne- L2.%=\n\t"
37 "stwcx. %2,0,%1\n\t"
38! "bne- L1.%=\n\t"
39! "L2.%=:"
40 : "=&r"(prev)
41 : "b" (mem), "r" (with), "r" (cmp)
42 : "cc", "memory");
43--- 240,252 ----
44 {
45 boost::uint32_t prev;
46
47! asm volatile ("1:\n\t"
48 "lwarx %0,0,%1\n\t"
49 "cmpw %0,%3\n\t"
50! "bne- 2f\n\t"
51 "stwcx. %2,0,%1\n\t"
52! "bne- 1b\n\t"
53! "2:"
54 : "=&r"(prev)
55 : "b" (mem), "r" (with), "r" (cmp)
56 : "cc", "memory");