diff options
author | Nathan Froyd <froydnj@codesourcery.com> | 2010-06-08 13:30:02 -0700 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2010-06-09 16:10:51 +0200 |
commit | 0fddbbf2559579ab6274c50819001f4eb9896b2a (patch) | |
tree | debf9addff44394d6e2a7aba20ee3a2f6badd18d /linux-user | |
parent | bbfa8f72e99baa0514b2b39e671830cf9a3adc44 (diff) | |
download | qemu-0fddbbf2559579ab6274c50819001f4eb9896b2a.tar.gz qemu-0fddbbf2559579ab6274c50819001f4eb9896b2a.tar.bz2 qemu-0fddbbf2559579ab6274c50819001f4eb9896b2a.zip |
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>
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index 0f23fc9cd9..ad292f16e4 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) { |