xemu/accel/tcg
Emilio G. Cota 1e05197f24 translate-all: iterate over TBs in a page with PAGE_FOR_EACH_TB
This commit does several things, but to avoid churn I merged them all
into the same commit. To wit:

- Use uintptr_t instead of TranslationBlock * for the list of TBs in a page.
  Just like we did in (c37e6d7e "tcg: Use uintptr_t type for
  jmp_list_{next|first} fields of TB"), the rationale is the same: these
  are tagged pointers, not pointers. So use a more appropriate type.

- Only check the least significant bit of the tagged pointers. Masking
  with 3/~3 is unnecessary and confusing.

- Introduce the TB_FOR_EACH_TAGGED macro, and use it to define
  PAGE_FOR_EACH_TB, which improves readability. Note that
  TB_FOR_EACH_TAGGED will gain another user in a subsequent patch.

- Update tb_page_remove to use PAGE_FOR_EACH_TB. In case there
  is a bug and we attempt to remove a TB that is not in the list, instead
  of segfaulting (since the list is NULL-terminated) we will reach
  g_assert_not_reached().

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2018-06-15 07:42:55 -10:00
..
atomic_template.h tcg: Use GEN_ATOMIC_HELPER_FN for opposite endian atomic add 2018-05-10 18:10:57 +01:00
cpu-exec-common.c icount: fix cpu_restore_state_from_tb for non-tb-exit cases 2018-04-11 09:05:22 +10:00
cpu-exec.c tcg: track TBs with per-region BST's 2018-06-15 07:42:55 -10:00
cputlb.c exec.c: Handle IOMMUs in address_space_translate_for_iotlb() 2018-06-15 15:23:34 +01:00
Makefile.objs tcg: Add generic vector expanders 2018-02-08 15:54:05 +00:00
softmmu_template.h accel/tcg: add size paremeter in tlb_fill() 2018-01-25 16:02:24 +01:00
tcg-all.c tcg: make tcg_allowed global 2017-07-04 16:01:16 +02:00
tcg-runtime-gvec.c tcg: Fix out-of-line generic vector compares 2018-04-06 23:08:50 +10:00
tcg-runtime.c tcg: add cs_base and flags to -d exec output 2017-12-29 12:43:40 -08:00
tcg-runtime.h tcg: Introduce atomic helpers for integer min/max 2018-05-10 18:10:57 +01:00
trace-events trace-events: fix code style: print 0x before hex numbers 2017-08-01 12:13:07 +01:00
translate-all.c translate-all: iterate over TBs in a page with PAGE_FOR_EACH_TB 2018-06-15 07:42:55 -10:00
translate-all.h tcg: move tcg backend files into accel/tcg/ 2017-06-15 11:04:06 +02:00
translator.c translator: merge max_insns into DisasContextBase 2018-05-09 10:12:21 -07:00
user-exec-stub.c accel/tcg: move user-exec to accel/tcg/ 2017-09-17 06:52:19 -07:00
user-exec.c icount: fix cpu_restore_state_from_tb for non-tb-exit cases 2018-04-11 09:05:22 +10:00