Revision 15388002
b/cpu-exec.c | ||
---|---|---|
126 | 126 |
/* cannot fail at this point */ |
127 | 127 |
tb = tb_alloc(pc); |
128 | 128 |
/* don't forget to invalidate previous TB info */ |
129 |
T0 = 0;
|
|
129 |
tb_invalidated_flag = 1;
|
|
130 | 130 |
} |
131 | 131 |
tc_ptr = code_gen_ptr; |
132 | 132 |
tb->tc_ptr = tc_ptr; |
... | ... | |
144 | 144 |
tb_link_phys(tb, phys_pc, phys_page2); |
145 | 145 |
|
146 | 146 |
found: |
147 |
if (tb_invalidated_flag) { |
|
148 |
/* as some TB could have been invalidated because |
|
149 |
of memory exceptions while generating the code, we |
|
150 |
must recompute the hash index here */ |
|
151 |
T0 = 0; |
|
152 |
} |
|
153 | 147 |
/* we add the TB in the virtual pc hash table */ |
154 | 148 |
env->tb_jmp_cache[tb_jmp_cache_hash_func(pc)] = tb; |
155 | 149 |
spin_unlock(&tb_lock); |
... | ... | |
201 | 195 |
if (__builtin_expect(!tb || tb->pc != pc || tb->cs_base != cs_base || |
202 | 196 |
tb->flags != flags, 0)) { |
203 | 197 |
tb = tb_find_slow(pc, cs_base, flags); |
198 |
/* Note: we do it here to avoid a gcc bug on Mac OS X when |
|
199 |
doing it in tb_find_slow */ |
|
200 |
if (tb_invalidated_flag) { |
|
201 |
/* as some TB could have been invalidated because |
|
202 |
of memory exceptions while generating the code, we |
|
203 |
must recompute the hash index here */ |
|
204 |
T0 = 0; |
|
205 |
} |
|
204 | 206 |
} |
205 | 207 |
return tb; |
206 | 208 |
} |
Also available in: Unified diff