aboutsummaryrefslogtreecommitdiff
path: root/target-alpha/op_helper.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2010-04-07 15:42:26 -0700
committerAurelien Jarno <aurelien@aurel32.net>2010-04-27 05:50:41 +0200
commit6910b8f66a9ad0c2c2052b4be884e11b76049718 (patch)
tree41ac594d78564a239e81f0b3b4b7a00a49525ec0 /target-alpha/op_helper.c
parent8aa3fa2038d9d0a7d69acdac505d990acc5eafc8 (diff)
target-alpha: Fix load-locked/store-conditional.
Use an exception plus start_exclusive to implement the compare-and-swap. This follows the example set by the MIPS and PPC ports. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target-alpha/op_helper.c')
-rw-r--r--target-alpha/op_helper.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/target-alpha/op_helper.c b/target-alpha/op_helper.c
index a20913033d..bfc095cc8a 100644
--- a/target-alpha/op_helper.c
+++ b/target-alpha/op_helper.c
@@ -1159,6 +1159,7 @@ void helper_hw_rei (void)
env->pc = env->ipr[IPR_EXC_ADDR] & ~3;
env->ipr[IPR_EXC_ADDR] = env->ipr[IPR_EXC_ADDR] & 1;
env->intr_flag = 0;
+ env->lock_addr = -1;
/* XXX: re-enable interrupts and memory mapping */
}
@@ -1167,6 +1168,7 @@ void helper_hw_ret (uint64_t a)
env->pc = a & ~3;
env->ipr[IPR_EXC_ADDR] = a & 1;
env->intr_flag = 0;
+ env->lock_addr = -1;
/* XXX: re-enable interrupts and memory mapping */
}