tcg: add early clober modifier in atomic16_cmpxchg on aarch64
PATCH 1/1 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 <[email protected]>
--- include/qemu/atomic128.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/qemu/atomic128.h +1 -1
@@ -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");
Signature · 1 line
2.17.1
Richard Henderson
AppliedQuoted 6 lines · Catherine Ho
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 <[email protected]>
Queued, thanks.
r~