diff options
author | Richard Henderson <rth@twiddle.net> | 2017-09-07 11:50:53 -0700 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2017-12-18 23:29:31 +0100 |
commit | f85da3081d001909929a19e530e69cea0487f00e (patch) | |
tree | 411c4cb169d1d71a319ffb03e9beb16021ae2dae /target/sh4/helper.c | |
parent | 6d56fc6cc372284a4571f09b361a9ccd99318103 (diff) | |
download | qemu-f85da3081d001909929a19e530e69cea0487f00e.zip |
target/sh4: Use cmpxchg for movco when parallel_cpus
As for other targets, cmpxchg isn't quite right for ll/sc,
suffering from an ABA race, but is sufficient to implement
portable atomic operations.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Message-Id: <20170907185057.23421-2-richard.henderson@linaro.org>
[aurel32: fix whitespace]
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target/sh4/helper.c')
-rw-r--r-- | target/sh4/helper.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/target/sh4/helper.c b/target/sh4/helper.c index 28d93c2543..680b583e53 100644 --- a/target/sh4/helper.c +++ b/target/sh4/helper.c @@ -171,6 +171,7 @@ void superh_cpu_do_interrupt(CPUState *cs) env->spc = env->pc; env->sgr = env->gregs[15]; env->sr |= (1u << SR_BL) | (1u << SR_MD) | (1u << SR_RB); + env->lock_addr = -1; if (env->flags & DELAY_SLOT_MASK) { /* Branch instruction should be executed again before delay slot. */ |