From bb8e3ea6fa8f616678133c9e8c8c3bf232c179ec Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 13 Sep 2019 12:07:40 -0400 Subject: exec: Cache TARGET_PAGE_MASK for TARGET_PAGE_BITS_VARY MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This eliminates a set of runtime shifts. It turns out that we require TARGET_PAGE_MASK more often than TARGET_PAGE_SIZE, so redefine TARGET_PAGE_SIZE based on TARGET_PAGE_MASK instead of the other way around. Reviewed-by: Alex Bennée Reviewed-by: David Hildenbrand Reviewed-by: Paolo Bonzini Signed-off-by: Richard Henderson --- exec-vary.c | 1 + 1 file changed, 1 insertion(+) (limited to 'exec-vary.c') diff --git a/exec-vary.c b/exec-vary.c index 8725fd0285..ff905f2a8f 100644 --- a/exec-vary.c +++ b/exec-vary.c @@ -96,6 +96,7 @@ void finalize_target_page_bits(void) if (init_target_page.bits == 0) { init_target_page.bits = TARGET_PAGE_BITS_MIN; } + init_target_page.mask = (target_long)-1 << init_target_page.bits; init_target_page.decided = true; /* -- cgit v1.2.3