Lines Matching refs:tb

183     const TranslationBlock *tb = p;  in tb_lookup_cmp()  local
186 if (tb->pc == desc->pc && in tb_lookup_cmp()
187 tb_page_addr0(tb) == desc->page_addr0 && in tb_lookup_cmp()
188 tb->cs_base == desc->cs_base && in tb_lookup_cmp()
189 tb->flags == desc->flags && in tb_lookup_cmp()
190 tb_cflags(tb) == desc->cflags) { in tb_lookup_cmp()
192 tb_page_addr_t tb_phys_page1 = tb_page_addr1(tb); in tb_lookup_cmp()
246 TranslationBlock *tb; in tb_lookup() local
258 tb = qatomic_load_acquire(&jc->array[hash].tb); in tb_lookup()
260 if (likely(tb && in tb_lookup()
262 tb->cs_base == cs_base && in tb_lookup()
263 tb->flags == flags && in tb_lookup()
264 tb_cflags(tb) == cflags)) { in tb_lookup()
265 return tb; in tb_lookup()
267 tb = tb_htable_lookup(cpu, pc, cs_base, flags, cflags); in tb_lookup()
268 if (tb == NULL) { in tb_lookup()
273 qatomic_store_release(&jc->array[hash].tb, tb); in tb_lookup()
276 tb = qatomic_rcu_read(&jc->array[hash].tb); in tb_lookup()
278 if (likely(tb && in tb_lookup()
279 tb->pc == pc && in tb_lookup()
280 tb->cs_base == cs_base && in tb_lookup()
281 tb->flags == flags && in tb_lookup()
282 tb_cflags(tb) == cflags)) { in tb_lookup()
283 return tb; in tb_lookup()
285 tb = tb_htable_lookup(cpu, pc, cs_base, flags, cflags); in tb_lookup()
286 if (tb == NULL) { in tb_lookup()
290 qatomic_set(&jc->array[hash].tb, tb); in tb_lookup()
293 return tb; in tb_lookup()
297 const TranslationBlock *tb) in log_cpu_exec() argument
303 cpu->cpu_index, tb->tc.ptr, tb->cs_base, pc, in log_cpu_exec()
304 tb->flags, tb->cflags, lookup_symbol(pc)); in log_cpu_exec()
411 TranslationBlock *tb; in HELPER() local
423 tb = tb_lookup(cpu, pc, cs_base, flags, cflags); in HELPER()
424 if (tb == NULL) { in HELPER()
429 log_cpu_exec(pc, cpu, tb); in HELPER()
432 return tb->tc.ptr; in HELPER()
570 TranslationBlock *tb; in cpu_exec_step_atomic() local
596 tb = tb_lookup(cpu, pc, cs_base, flags, cflags); in cpu_exec_step_atomic()
597 if (tb == NULL) { in cpu_exec_step_atomic()
599 tb = tb_gen_code(cpu, pc, cs_base, flags, cflags); in cpu_exec_step_atomic()
605 trace_exec_tb(tb, pc); in cpu_exec_step_atomic()
606 cpu_tb_exec(cpu, tb, &tb_exit); in cpu_exec_step_atomic()
622 void tb_set_jmp_target(TranslationBlock *tb, int n, uintptr_t addr) in tb_set_jmp_target() argument
629 const TranslationBlock *c_tb = tcg_splitwx_to_rx(tb); in tb_set_jmp_target()
630 uintptr_t offset = tb->jmp_insn_offset[n]; in tb_set_jmp_target()
631 uintptr_t jmp_rx = (uintptr_t)tb->tc.ptr + offset; in tb_set_jmp_target()
634 tb->jmp_target_addr[n] = addr; in tb_set_jmp_target()
638 static inline void tb_add_jump(TranslationBlock *tb, int n, in tb_add_jump() argument
644 assert(n < ARRAY_SIZE(tb->jmp_list_next)); in tb_add_jump()
652 old = qatomic_cmpxchg(&tb->jmp_dest[n], (uintptr_t)NULL, in tb_add_jump()
659 tb_set_jmp_target(tb, n, (uintptr_t)tb_next->tc.ptr); in tb_add_jump()
662 tb->jmp_list_next[n] = tb_next->jmp_list_head; in tb_add_jump()
663 tb_next->jmp_list_head = (uintptr_t)tb | n; in tb_add_jump()
668 tb->tc.ptr, n, tb_next->tc.ptr); in tb_add_jump()
913 static inline void cpu_loop_exec_tb(CPUState *cpu, TranslationBlock *tb, in cpu_loop_exec_tb() argument
919 trace_exec_tb(tb, pc); in cpu_loop_exec_tb()
920 tb = cpu_tb_exec(cpu, tb, tb_exit); in cpu_loop_exec_tb()
922 *last_tb = tb; in cpu_loop_exec_tb()
954 if (insns_left > 0 && insns_left < tb->icount) { in cpu_loop_exec_tb()
957 cpu->cflags_next_tb = (tb->cflags & ~CF_COUNT_MASK) | insns_left; in cpu_loop_exec_tb()
975 TranslationBlock *tb; in cpu_exec_loop() local
1000 tb = tb_lookup(cpu, pc, cs_base, flags, cflags); in cpu_exec_loop()
1001 if (tb == NULL) { in cpu_exec_loop()
1006 tb = tb_gen_code(cpu, pc, cs_base, flags, cflags); in cpu_exec_loop()
1018 qatomic_store_release(&jc->array[h].tb, tb); in cpu_exec_loop()
1021 qatomic_set(&jc->array[h].tb, tb); in cpu_exec_loop()
1032 if (tb_page_addr1(tb) != -1) { in cpu_exec_loop()
1038 tb_add_jump(last_tb, tb_exit, tb); in cpu_exec_loop()
1041 cpu_loop_exec_tb(cpu, tb, pc, &last_tb, &tb_exit); in cpu_exec_loop()