Commit 30d6cb8479163676bf27bf73464a899db985f1f9

Authored by bellard
1 parent 6f970bd9

correct MIPS state restoring (Daniel Jacobowitz)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1686 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 2 changed files with 5 additions and 0 deletions
exec-all.h
@@ -62,6 +62,7 @@ extern target_ulong gen_opc_npc[OPC_BUF_SIZE]; @@ -62,6 +62,7 @@ extern target_ulong gen_opc_npc[OPC_BUF_SIZE];
62 extern uint8_t gen_opc_cc_op[OPC_BUF_SIZE]; 62 extern uint8_t gen_opc_cc_op[OPC_BUF_SIZE];
63 extern uint8_t gen_opc_instr_start[OPC_BUF_SIZE]; 63 extern uint8_t gen_opc_instr_start[OPC_BUF_SIZE];
64 extern target_ulong gen_opc_jump_pc[2]; 64 extern target_ulong gen_opc_jump_pc[2];
  65 +extern uint32_t gen_opc_hflags[OPC_BUF_SIZE];
65 66
66 typedef void (GenOpFunc)(void); 67 typedef void (GenOpFunc)(void);
67 typedef void (GenOpFunc1)(long); 68 typedef void (GenOpFunc1)(long);
translate-all.c
@@ -53,6 +53,8 @@ uint8_t gen_opc_cc_op[OPC_BUF_SIZE]; @@ -53,6 +53,8 @@ uint8_t gen_opc_cc_op[OPC_BUF_SIZE];
53 #elif defined(TARGET_SPARC) 53 #elif defined(TARGET_SPARC)
54 target_ulong gen_opc_npc[OPC_BUF_SIZE]; 54 target_ulong gen_opc_npc[OPC_BUF_SIZE];
55 target_ulong gen_opc_jump_pc[2]; 55 target_ulong gen_opc_jump_pc[2];
  56 +#elif defined(TARGET_MIPS)
  57 +uint32_t gen_opc_hflags[OPC_BUF_SIZE];
56 #endif 58 #endif
57 59
58 int code_copy_enabled = 1; 60 int code_copy_enabled = 1;
@@ -302,6 +304,8 @@ int cpu_restore_state(TranslationBlock *tb, @@ -302,6 +304,8 @@ int cpu_restore_state(TranslationBlock *tb,
302 } 304 }
303 #elif defined(TARGET_MIPS) 305 #elif defined(TARGET_MIPS)
304 env->PC = gen_opc_pc[j]; 306 env->PC = gen_opc_pc[j];
  307 + env->hflags &= ~MIPS_HFLAG_BMASK;
  308 + env->hflags |= gen_opc_hflags[j];
305 #endif 309 #endif
306 return 0; 310 return 0;
307 } 311 }