mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-05-08 20:32:16 +00:00
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") Backports commit 7400d6938c6d455c4eba2b80c06d60c8fa5c5ba3 from qemu
This commit is contained in:
parent
c8a49d8593
commit
17477ac1ca
|
@ -68,7 +68,7 @@ static inline Int128 atomic16_cmpxchg(Int128 *ptr, Int128 cmp, Int128 new)
|
||||||
"cbnz %w[tmp], 0b\n"
|
"cbnz %w[tmp], 0b\n"
|
||||||
"1:"
|
"1:"
|
||||||
: [mem] "+m"(*ptr), [tmp] "=&r"(tmp),
|
: [mem] "+m"(*ptr), [tmp] "=&r"(tmp),
|
||||||
[oldl] "=&r"(oldl), [oldh] "=r"(oldh)
|
[oldl] "=&r"(oldl), [oldh] "=&r"(oldh)
|
||||||
: [cmpl] "r"(cmpl), [cmph] "r"(cmph),
|
: [cmpl] "r"(cmpl), [cmph] "r"(cmph),
|
||||||
[newl] "r"(newl), [newh] "r"(newh)
|
[newl] "r"(newl), [newh] "r"(newh)
|
||||||
: "memory", "cc");
|
: "memory", "cc");
|
||||||
|
|
Loading…
Reference in a new issue