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>
This commit is contained in:
Richard Henderson 2010-04-07 15:42:26 -07:00 committed by Aurelien Jarno
parent 8aa3fa2038
commit 6910b8f66a
5 changed files with 193 additions and 79 deletions

View file

@ -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 */
}