/[qemu]/qemu/cpu-exec.c
ViewVC logotype

Diff of /qemu/cpu-exec.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.19 by bellard, Thu Oct 30 01:07:51 2003 UTC revision 1.20 by bellard, Wed Nov 19 22:12:01 2003 UTC
# Line 21  Line 21 
21  #include "exec.h"  #include "exec.h"
22  #include "disas.h"  #include "disas.h"
23    
24    int tb_invalidated_flag;
25    
26  //#define DEBUG_EXEC  //#define DEBUG_EXEC
27  //#define DEBUG_SIGNAL  //#define DEBUG_SIGNAL
28    
# Line 273  int cpu_exec(CPUState *env1) Line 275  int cpu_exec(CPUState *env1)
275                      tb->tc_ptr = tc_ptr;                      tb->tc_ptr = tc_ptr;
276                      tb->cs_base = (unsigned long)cs_base;                      tb->cs_base = (unsigned long)cs_base;
277                      tb->flags = flags;                      tb->flags = flags;
278                      /* XXX: an MMU exception can occur here */                      tb_invalidated_flag = 0;
279                      cpu_gen_code(env, tb, CODE_GEN_MAX_SIZE, &code_gen_size);                      cpu_gen_code(env, tb, CODE_GEN_MAX_SIZE, &code_gen_size);
280                        if (tb_invalidated_flag) {
281                            /* as some TB could have been invalidated because
282                               of memory exceptions while generating the code, we
283                               must recompute the hash index here */
284                            ptb = &tb_hash[tb_hash_func((unsigned long)pc)];
285                            while (*ptb != NULL)
286                                ptb = &(*ptb)->hash_next;
287                            T0 = 0;
288                        }
289                      *ptb = tb;                      *ptb = tb;
290                      tb->hash_next = NULL;                      tb->hash_next = NULL;
291                      tb_link(tb);                      tb_link(tb);

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26