Home | History | Annotate | Download | only in qemu

Lines Matching refs:tb

70 void gen_intermediate_code(CPUState *env, struct TranslationBlock *tb);
71 void gen_intermediate_code_pc(CPUState *env, struct TranslationBlock *tb);
72 void restore_state_to_opc(CPUState *env, struct TranslationBlock *tb, int pc_pos);
76 int cpu_gen_code(CPUState *env, struct TranslationBlock *tb,
78 int cpu_restore_state(struct TranslationBlock *tb,
112 /* estimated block size for TB allocation */
136 /* next matching tb for physical address. */
143 /* the following data are used to directly call another TB from
203 tb_get_tb_pc(const TranslationBlock* tb, unsigned int pair)
205 return (tb->tpc2gpc != NULL && pair < tb->tpc2gpc_pairs) ?
206 tb->tpc2gpc[pair * 2] : 0;
214 tb_get_guest_pc(const TranslationBlock* tb, unsigned int pair)
216 return (tb->tpc2gpc != NULL && pair < tb->tpc2gpc_pairs) ?
217 tb->tpc2gpc[pair * 2 + 1] : 0;
223 * translated PC in tb's tpc2gpc array.
226 tb_search_guest_pc_from_tb_pc(const TranslationBlock* tb, target_ulong tb_pc)
228 if (tb->tpc2gpc != NULL && tb->tpc2gpc_pairs != 0) {
230 unsigned int m_max = (tb->tpc2gpc_pairs - 1) << 1;
231 /* Make sure that tb_pc is within TB array. */
232 if (tb_pc < tb->tpc2gpc[0]) {
237 if (tb_pc < tb->tpc2gpc[m]) {
239 } else if (m == m_max || tb_pc < tb->tpc2gpc[m + 2]) {
240 return tb->tpc2gpc[m + 1];
245 return tb->tpc2gpc[m_max + 1];
252 void tb_free(TranslationBlock *tb);
254 void tb_link_phys(TranslationBlock *tb,
256 void tb_phys_invalidate(TranslationBlock *tb, target_ulong page_addr);
302 static inline void tb_set_jmp_target(TranslationBlock *tb,
307 offset = tb->tb_jmp_offset[n];
308 tb_set_jmp_target1((unsigned long)(tb->tc_ptr + offset), addr);
309 offset = tb->tb_jmp_offset[n + 2];
311 tb_set_jmp_target1((unsigned long)(tb->tc_ptr + offset), addr);
317 static inline void tb_set_jmp_target(TranslationBlock *tb,
320 tb->tb_next[n] = addr;
325 static inline void tb_add_jump(TranslationBlock *tb, int n,
329 if (!tb->jmp_next[n]) {
331 tb_set_jmp_target(tb, n, (unsigned long)tb_next->tc_ptr);
333 /* add in TB jmp circular list */
334 tb->jmp_next[n] = tb_next->jmp_first;
335 tb_next->jmp_first = (TranslationBlock *)((long)(tb) | (n));