Home | History | Annotate | Download | only in qemu

Lines Matching refs:tb

61 void gen_intermediate_code(CPUState *env, struct TranslationBlock *tb);
62 void gen_intermediate_code_pc(CPUState *env, struct TranslationBlock *tb);
63 void gen_pc_load(CPUState *env, struct TranslationBlock *tb,
68 int cpu_gen_code(CPUState *env, struct TranslationBlock *tb,
70 int cpu_restore_state(struct TranslationBlock *tb,
73 int cpu_restore_state_copy(struct TranslationBlock *tb,
108 /* estimated block size for TB allocation */
132 /* next matching tb for physical address. */
139 /* the following data are used to directly call another TB from
199 tb_get_tb_pc(const TranslationBlock* tb, unsigned int pair)
201 return (tb->tpc2gpc != NULL && pair < tb->tpc2gpc_pairs) ?
202 tb->tpc2gpc[pair * 2] : 0;
210 tb_get_guest_pc(const TranslationBlock* tb, unsigned int pair)
212 return (tb->tpc2gpc != NULL && pair < tb->tpc2gpc_pairs) ?
213 tb->tpc2gpc[pair * 2 + 1] : 0;
219 * translated PC in tb's tpc2gpc array.
222 tb_search_guest_pc_from_tb_pc(const TranslationBlock* tb, target_ulong tb_pc)
224 if (tb->tpc2gpc != NULL && tb->tpc2gpc_pairs != 0) {
226 unsigned int m_max = (tb->tpc2gpc_pairs - 1) << 1;
227 /* Make sure that tb_pc is within TB array. */
228 if (tb_pc < tb->tpc2gpc[0]) {
233 if (tb_pc < tb->tpc2gpc[m]) {
235 } else if (m == m_max || tb_pc < tb->tpc2gpc[m + 2]) {
236 return tb->tpc2gpc[m + 1];
241 return tb->tpc2gpc[m_max + 1];
248 void tb_free(TranslationBlock *tb);
250 void tb_link_phys(TranslationBlock *tb,
252 void tb_phys_invalidate(TranslationBlock *tb, target_ulong page_addr);
298 static inline void tb_set_jmp_target(TranslationBlock *tb,
303 offset = tb->tb_jmp_offset[n];
304 tb_set_jmp_target1((unsigned long)(tb->tc_ptr + offset), addr);
305 offset = tb->tb_jmp_offset[n + 2];
307 tb_set_jmp_target1((unsigned long)(tb->tc_ptr + offset), addr);
313 static inline void tb_set_jmp_target(TranslationBlock *tb,
316 tb->tb_next[n] = addr;
321 static inline void tb_add_jump(TranslationBlock *tb, int n,
325 if (!tb->jmp_next[n]) {
327 tb_set_jmp_target(tb, n, (unsigned long)tb_next->tc_ptr);
329 /* add in TB jmp circular list */
330 tb->jmp_next[n] = tb_next->jmp_first;
331 tb_next->jmp_first = (TranslationBlock *)((long)(tb) | (n));
410 instruction of a TB so that interrupts take effect immediately. */