summaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2010-04-12 16:14:54 -0700
committerAurelien Jarno <aurelien@aurel32.net>2010-04-27 05:50:41 +0200
commitac316ca4b7b27c853c0d9d6b43abdbefc97297d6 (patch)
treefb93c58e301dd4cdd40fd29e24e06313853daf79 /linux-user
parentdc96be4b975d51f03d0b08e191fddf85b92c0267 (diff)
downloadqemu-ac316ca4b7b27c853c0d9d6b43abdbefc97297d6.tar.gz
qemu-ac316ca4b7b27c853c0d9d6b43abdbefc97297d6.tar.bz2
qemu-ac316ca4b7b27c853c0d9d6b43abdbefc97297d6.zip
target-alpha: Implement rs/rc properly.
This is a per-cpu flag; there's no need for a spinlock of any kind. We were also failing to manipulate the flag with $31 as a target reg and failing to clear the flag on execution of a return-from-interrupt instruction. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 71a1b6737e..5680d8e0cd 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -2358,6 +2358,11 @@ void cpu_loop (CPUState *env)
while (1) {
trapnr = cpu_alpha_exec (env);
+ /* All of the traps imply a transition through PALcode, which
+ implies an REI instruction has been executed. Which means
+ that the intr_flag should be cleared. */
+ env->intr_flag = 0;
+
switch (trapnr) {
case EXCP_RESET:
fprintf(stderr, "Reset requested. Exit\n");
@@ -2444,7 +2449,7 @@ void cpu_loop (CPUState *env)
env->ir[IR_A0], env->ir[IR_A1],
env->ir[IR_A2], env->ir[IR_A3],
env->ir[IR_A4], env->ir[IR_A5]);
- if (trapnr != TARGET_NR_sigreturn
+ if (trapnr != TARGET_NR_sigreturn
&& trapnr != TARGET_NR_rt_sigreturn) {
env->ir[IR_V0] = (sysret < 0 ? -sysret : sysret);
env->ir[IR_A3] = (sysret < 0);