aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2010-06-08 13:30:02 -0700
committerAurelien Jarno <aurelien@aurel32.net>2010-06-09 16:10:51 +0200
commit0fddbbf2559579ab6274c50819001f4eb9896b2a (patch)
treedebf9addff44394d6e2a7aba20ee3a2f6badd18d
parentbbfa8f72e99baa0514b2b39e671830cf9a3adc44 (diff)
downloadqemu-0fddbbf2559579ab6274c50819001f4eb9896b2a.zip
qemu-0fddbbf2559579ab6274c50819001f4eb9896b2a.tar.gz
qemu-0fddbbf2559579ab6274c50819001f4eb9896b2a.tar.bz2
linux-user: honor low bit of entry PC for MIPS
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
-rw-r--r--linux-user/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 0f23fc9..ad292f1 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -3271,7 +3271,10 @@ int main(int argc, char **argv, char **envp)
for(i = 0; i < 32; i++) {
env->active_tc.gpr[i] = regs->regs[i];
}
- env->active_tc.PC = regs->cp0_epc;
+ env->active_tc.PC = regs->cp0_epc & ~(target_ulong)1;
+ if (regs->cp0_epc & 1) {
+ env->hflags |= MIPS_HFLAG_M16;
+ }
}
#elif defined(TARGET_SH4)
{