aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2010-06-08 13:30:03 -0700
committerAurelien Jarno <aurelien@aurel32.net>2010-06-09 16:10:51 +0200
commitaecf13769852a4e14b51e8403860b18871826298 (patch)
treed24306bb1f1dc5d2bdd1a72f18566440bed31582
parent0fddbbf2559579ab6274c50819001f4eb9896b2a (diff)
downloadqemu-aecf13769852a4e14b51e8403860b18871826298.zip
qemu-aecf13769852a4e14b51e8403860b18871826298.tar.gz
qemu-aecf13769852a4e14b51e8403860b18871826298.tar.bz2
hw: honor low bit in mipssim machine
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
-rw-r--r--hw/mips_mipssim.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/mips_mipssim.c b/hw/mips_mipssim.c
index a747de5..293d99e 100644
--- a/hw/mips_mipssim.c
+++ b/hw/mips_mipssim.c
@@ -106,7 +106,10 @@ static void main_cpu_reset(void *opaque)
CPUState *env = s->env;
cpu_reset(env);
- env->active_tc.PC = s->vector;
+ env->active_tc.PC = s->vector & ~(target_ulong)1;
+ if (s->vector & 1) {
+ env->hflags |= MIPS_HFLAG_M16;
+ }
}
static void