From ab72f9c8671ba818acf19d3e5329183d97a8b7ce Mon Sep 17 00:00:00 2001
From: David Srbecky <dsrbecky@google.com>
Date: Fri, 4 Feb 2022 15:47:27 +0000
Subject: Fix THREAD_INTERPRETER_CACHE_SIZE_SHIFT

It has correct value for x86, but needs to be larger for x86_64

Test: ./art/test.py -b -r --interpreter
Change-Id: I894c2453c790d3be760188d5efb7d0838d5a584d
---
 tools/cpp-define-generator/thread.def | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'tools/cpp-define-generator/thread.def')

diff --git a/tools/cpp-define-generator/thread.def b/tools/cpp-define-generator/thread.def
index ec8e28b977..7df7650890 100644
--- a/tools/cpp-define-generator/thread.def
+++ b/tools/cpp-define-generator/thread.def
@@ -34,7 +34,7 @@ ASM_DEFINE(THREAD_INTERPRETER_CACHE_SIZE_LOG2,
 ASM_DEFINE(THREAD_INTERPRETER_CACHE_SIZE_MASK,
            (sizeof(art::InterpreterCache::Entry) * (art::InterpreterCache::kSize - 1)))
 ASM_DEFINE(THREAD_INTERPRETER_CACHE_SIZE_SHIFT,
-           2)
+           (art::WhichPowerOf2(sizeof(art::InterpreterCache::Entry)) - 2))
 ASM_DEFINE(THREAD_IS_GC_MARKING_OFFSET,
            art::Thread::IsGcMarkingOffset<art::kRuntimePointerSize>().Int32Value())
 ASM_DEFINE(THREAD_LOCAL_ALLOC_STACK_END_OFFSET,
-- 
cgit v1.2.3-59-g8ed1b

