From a00b54b74bee06c006b8bebfbef85e2801de293c Mon Sep 17 00:00:00 2001
From: Nicolas Geoffray <ngeoffray@google.com>
Date: Tue, 3 Dec 2019 14:36:42 +0000
Subject: Helpers and refactorings to prepare for interpreter optimizations
 (x64)

- Add data structure offsets that will be used in assembly code.
- Be explicit about a stack overflow in a fault handler.
- Move assembly helper code in asm_support so interpreter can use it.
- Support putting literals in InterpreterCache.
- Fix artHandleFillArrayDataFromCode for x64.

Bug: 119800099
Test: test.py
Change-Id: I2729f87fe5d09c04ae2e7081636f0cd89ac14c21
---
 tools/cpp-define-generator/thread.def | 11 +++++++++++
 1 file changed, 11 insertions(+)

(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 8c91dc8a87..72cd2a98f1 100644
--- a/tools/cpp-define-generator/thread.def
+++ b/tools/cpp-define-generator/thread.def
@@ -15,6 +15,7 @@
  */
 
 #if ASM_DEFINE_INCLUDE_DEPENDENCIES
+#include "entrypoints/quick/quick_entrypoints_enum.h"
 #include "thread.h"
 #endif
 
@@ -36,6 +37,8 @@ ASM_DEFINE(THREAD_INTERPRETER_CACHE_OFFSET,
            art::Thread::InterpreterCacheOffset<art::kRuntimePointerSize>().Int32Value())
 ASM_DEFINE(THREAD_INTERPRETER_CACHE_SIZE_LOG2,
            art::Thread::InterpreterCacheSizeLog2())
+ASM_DEFINE(THREAD_INTERPRETER_CACHE_SIZE_MASK,
+           (sizeof(art::InterpreterCache::Entry) * (art::InterpreterCache::kSize - 1)))
 ASM_DEFINE(THREAD_IS_GC_MARKING_OFFSET,
            art::Thread::IsGcMarkingOffset<art::kRuntimePointerSize>().Int32Value())
 ASM_DEFINE(THREAD_LOCAL_ALLOC_STACK_END_OFFSET,
@@ -60,3 +63,11 @@ ASM_DEFINE(THREAD_USE_MTERP_OFFSET,
            art::Thread::UseMterpOffset<art::kRuntimePointerSize>().Int32Value())
 ASM_DEFINE(THREAD_TOP_QUICK_FRAME_OFFSET,
            art::Thread::TopOfManagedStackOffset<art::kRuntimePointerSize>().Int32Value())
+ASM_DEFINE(THREAD_ALLOC_OBJECT_ENTRYPOINT_OFFSET,
+           art::GetThreadOffset<art::kRuntimePointerSize>(art::kQuickAllocObjectInitialized)
+               .Int32Value())
+ASM_DEFINE(THREAD_ALLOC_ARRAY_ENTRYPOINT_OFFSET,
+           art::GetThreadOffset<art::kRuntimePointerSize>(art::kQuickAllocArrayResolved)
+               .Int32Value())
+ASM_DEFINE(THREAD_READ_BARRIER_MARK_REG00_OFFSET,
+           art::Thread::ReadBarrierMarkEntryPointsOffset<art::kRuntimePointerSize>(0))
-- 
cgit v1.2.3-59-g8ed1b

