diff options
author | Catherine Ho <catherine.hecx@gmail.com> | 2019-01-30 03:59:54 -0500 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2019-02-06 03:38:39 +0000 |
commit | 7400d6938c6d455c4eba2b80c06d60c8fa5c5ba3 (patch) | |
tree | f0d83ba00d7b2ac5970dbe699cb724f500824362 /include | |
parent | 47994e16b1d66411953623e7c0bf0cdcd50bd507 (diff) |
tcg: add early clober modifier in atomic16_cmpxchg on aarch64
Without this patch, gcc might up the Input/Output registers and
cause unpredictable error.
Fixes: 1ec182c33379 ("target/arm: Convert to HAVE_CMPXCHG128")
Signed-off-by: Catherine Ho <catherine.hecx@gmail.com>
Message-Id: <1548838794-23757-1-git-send-email-catherine.hecx@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/qemu/atomic128.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/qemu/atomic128.h b/include/qemu/atomic128.h index a6af22ff10..ddd0d55d31 100644 --- a/include/qemu/atomic128.h +++ b/include/qemu/atomic128.h @@ -68,7 +68,7 @@ static inline Int128 atomic16_cmpxchg(Int128 *ptr, Int128 cmp, Int128 new) "cbnz %w[tmp], 0b\n" "1:" : [mem] "+m"(*ptr), [tmp] "=&r"(tmp), - [oldl] "=&r"(oldl), [oldh] "=r"(oldh) + [oldl] "=&r"(oldl), [oldh] "=&r"(oldh) : [cmpl] "r"(cmpl), [cmph] "r"(cmph), [newl] "r"(newl), [newh] "r"(newh) : "memory", "cc"); |