diff options
author | Rickard Green <[email protected]> | 2016-02-17 16:56:05 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2016-02-18 16:10:31 +0100 |
commit | eb59e961ae05048ea30362aafb7f91db26ceb939 (patch) | |
tree | a95909e1a97d5ff7f4b3b3a5ea9f1d28bb5b4c4c /erts/aclocal.m4 | |
parent | 661aeed3ef57de87330123adf6100e179fd7dad0 (diff) | |
download | otp-eb59e961ae05048ea30362aafb7f91db26ceb939.tar.gz otp-eb59e961ae05048ea30362aafb7f91db26ceb939.tar.bz2 otp-eb59e961ae05048ea30362aafb7f91db26ceb939.zip |
Improve cmpxchg8b/cmpxchg16b inline asm
Clang didn't like that ecx/rcx was mapped to input and output
variables of different types.
Diffstat (limited to 'erts/aclocal.m4')
-rw-r--r-- | erts/aclocal.m4 | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/erts/aclocal.m4 b/erts/aclocal.m4 index 3db6ff5b4c..ec9b66bf29 100644 --- a/erts/aclocal.m4 +++ b/erts/aclocal.m4 @@ -2157,8 +2157,8 @@ case "$GCC-$host_cpu" in "lock; cmpxchg16b %0\n\t" #endif "setz %3\n\t" - : "=m"(*p), "=d"(xchg[1]), "=a"(xchg[0]), "=c"(xchgd) - : "m"(*p), "1"(xchg[1]), "2"(xchg[0]), "3"(new[1]), "b"(new[0]) + : "=m"(*p), "=d"(xchg[1]), "=a"(xchg[0]), "=q"(xchgd) + : "m"(*p), "1"(xchg[1]), "2"(xchg[0]), "c"(new[1]), "b"(new[0]) : "cc", "memory"); ], [plain_cmpxchg=yes]) @@ -2217,8 +2217,8 @@ case "$GCC-$host_cpu" in "lock; cmpxchg8b %0\n\t" "setz %3\n\t" "popl %%ebx\n\t" - : "=m"(*p), "=d"(xchg[1]), "=a"(xchg[0]), "=c"(xchgd) - : "m"(*p), "1"(xchg[1]), "2"(xchg[0]), "3"(new[1]), "r"(new[0]) + : "=m"(*p), "=d"(xchg[1]), "=a"(xchg[0]), "=q"(xchgd) + : "m"(*p), "1"(xchg[1]), "2"(xchg[0]), "c"(new[1]), "r"(new[0]) : "cc", "memory"); ], [gcc_pic_dw_cmpxchg_asm=yes @@ -2238,14 +2238,14 @@ case "$GCC-$host_cpu" in char xchgd; long new[2], xchg[2], *p; __asm__ __volatile__( - "pushl %%ebx\n\t" - "movl (%7), %%ebx\n\t" - "movl 4(%7), %%ecx\n\t" - "lock; cmpxchg8b %0\n\t" - "setz %3\n\t" - "popl %%ebx\n\t" - : "=m"(*p), "=d"(xchg[1]), "=a"(xchg[0]), "=c"(xchgd) - : "m"(*p), "1"(xchg[1]), "2"(xchg[0]), "3"(new) + "pushl %%ebx\n\t" + "movl (%7), %%ebx\n\t" + "movl 4(%7), %%ecx\n\t" + "lock; cmpxchg8b %0\n\t" + "setz %3\n\t" + "popl %%ebx\n\t" + : "=m"(*p), "=d"(xchg[1]), "=a"(xchg[0]), "=c"(xchgd) + : "m"(*p), "1"(xchg[1]), "2"(xchg[0]), "r"(new) : "cc", "memory"); ], |