Revision bf20dc07 exec.c

b/exec.c
109 109
   cpu_exec() */
110 110
CPUState *cpu_single_env;
111 111
/* 0 = Do not count executed instructions.
112
   1 = Precice instruction counting.
112
   1 = Precise instruction counting.
113 113
   2 = Adaptive rate instruction counting.  */
114 114
int use_icount = 0;
115 115
/* Current instruction counter.  While executing translated code this may
......
1080 1080

  
1081 1081
void tb_free(TranslationBlock *tb)
1082 1082
{
1083
    /* In practice this is mostly used for single use temorary TB
1083
    /* In practice this is mostly used for single use temporary TB
1084 1084
       Ignore the hard cases and just back up if this TB happens to
1085 1085
       be the last one generated.  */
1086 1086
    if (nb_tbs > 0 && tb == &tbs[nb_tbs - 1]) {
......
1394 1394

  
1395 1395
    old_mask = env->interrupt_request;
1396 1396
    /* FIXME: This is probably not threadsafe.  A different thread could
1397
       be in the mittle of a read-modify-write operation.  */
1397
       be in the middle of a read-modify-write operation.  */
1398 1398
    env->interrupt_request |= mask;
1399 1399
#if defined(USE_NPTL)
1400 1400
    /* FIXME: TB unchaining isn't SMP safe.  For now just ignore the
......
3019 3019
    n = env->icount_decr.u16.low + tb->icount;
3020 3020
    cpu_restore_state(tb, env, (unsigned long)retaddr, NULL);
3021 3021
    /* Calculate how many instructions had been executed before the fault
3022
       occured.  */
3022
       occurred.  */
3023 3023
    n = n - env->icount_decr.u16.low;
3024 3024
    /* Generate a new TB ending on the I/O insn.  */
3025 3025
    n++;
3026 3026
    /* On MIPS and SH, delay slot instructions can only be restarted if
3027 3027
       they were already the first instruction in the TB.  If this is not
3028
       the first instruction in a TB then re-execute the preceeding
3028
       the first instruction in a TB then re-execute the preceding
3029 3029
       branch.  */
3030 3030
#if defined(TARGET_MIPS)
3031 3031
    if ((env->hflags & MIPS_HFLAG_BMASK) != 0 && n > 1) {
......
3053 3053
    /* FIXME: In theory this could raise an exception.  In practice
3054 3054
       we have already translated the block once so it's probably ok.  */
3055 3055
    tb_gen_code(env, pc, cs_base, flags, cflags);
3056
    /* TODO: If env->pc != tb->pc (i.e. the failuting instruction was not
3056
    /* TODO: If env->pc != tb->pc (i.e. the faulting instruction was not
3057 3057
       the first in the TB) then we end up generating a whole new TB and
3058 3058
       repeating the fault, which is horribly inefficient.
3059 3059
       Better would be to execute just this insn uncached, or generate a

Also available in: Unified diff