From c1ca2ae0ba608826d7198ad3afe78b27c9f338ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Tue, 9 Mar 2021 13:24:54 -0500 Subject: [PATCH] include/exec: lightly re-arrange TranslationBlock Lets make sure all the flags we compare when looking up blocks are together in the same place. Backports 872ebd884dd68ecef4c6f9f86c5da519f18bd31e --- qemu/include/exec/exec-all.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/qemu/include/exec/exec-all.h b/qemu/include/exec/exec-all.h index 03fed36c..bf8a8249 100644 --- a/qemu/include/exec/exec-all.h +++ b/qemu/include/exec/exec-all.h @@ -290,9 +290,6 @@ struct TranslationBlock { target_ulong pc; /* simulated PC corresponding to this block (EIP + CS base) */ target_ulong cs_base; /* CS base for this block */ uint32_t flags; /* flags defining in which context the code was generated */ - uint16_t size; /* size of target code for this block (1 <= - size <= TARGET_PAGE_SIZE) */ - uint16_t icount; uint32_t cflags; /* compile flags */ #define CF_COUNT_MASK 0x00007fff #define CF_LAST_IO 0x00008000 /* Last insn may be an IO access. */ @@ -304,6 +301,14 @@ struct TranslationBlock { #define CF_HASH_MASK \ (CF_COUNT_MASK | CF_LAST_IO | CF_USE_ICOUNT | CF_PARALLEL) + /* + * Above fields used for comparing + */ + + /* size of target code for this block (1 <= size <= TARGET_PAGE_SIZE) */ + uint16_t size; + uint16_t icount; + struct tb_tc tc; /* next matching tb for physical address. */ struct TranslationBlock *phys_hash_next;