summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/cpp-define-generator/art_field.def24
-rw-r--r--tools/cpp-define-generator/art_method.def8
-rw-r--r--tools/cpp-define-generator/asm_defines.def2
-rw-r--r--tools/cpp-define-generator/code_item.def28
-rw-r--r--tools/cpp-define-generator/globals.def2
-rw-r--r--tools/cpp-define-generator/mirror_class.def8
-rw-r--r--tools/cpp-define-generator/mirror_object.def7
-rw-r--r--tools/cpp-define-generator/thread.def11
8 files changed, 90 insertions, 0 deletions
diff --git a/tools/cpp-define-generator/art_field.def b/tools/cpp-define-generator/art_field.def
new file mode 100644
index 0000000000..a15076f9c0
--- /dev/null
+++ b/tools/cpp-define-generator/art_field.def
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#if ASM_DEFINE_INCLUDE_DEPENDENCIES
+#include "art_field.h"
+#endif
+
+ASM_DEFINE(ART_FIELD_OFFSET_OFFSET,
+ art::ArtField::OffsetOffset().Int32Value())
+ASM_DEFINE(ART_FIELD_DECLARING_CLASS_OFFSET,
+ art::ArtField::DeclaringClassOffset().Int32Value())
diff --git a/tools/cpp-define-generator/art_method.def b/tools/cpp-define-generator/art_method.def
index 21859dc9ce..75fbab0c28 100644
--- a/tools/cpp-define-generator/art_method.def
+++ b/tools/cpp-define-generator/art_method.def
@@ -20,6 +20,8 @@
ASM_DEFINE(ART_METHOD_ACCESS_FLAGS_OFFSET,
art::ArtMethod::AccessFlagsOffset().Int32Value())
+ASM_DEFINE(ART_METHOD_IS_STATIC_FLAG,
+ art::kAccStatic)
ASM_DEFINE(ART_METHOD_DECLARING_CLASS_OFFSET,
art::ArtMethod::DeclaringClassOffset().Int32Value())
ASM_DEFINE(ART_METHOD_JNI_OFFSET_32,
@@ -30,3 +32,9 @@ ASM_DEFINE(ART_METHOD_QUICK_CODE_OFFSET_32,
art::ArtMethod::EntryPointFromQuickCompiledCodeOffset(art::PointerSize::k32).Int32Value())
ASM_DEFINE(ART_METHOD_QUICK_CODE_OFFSET_64,
art::ArtMethod::EntryPointFromQuickCompiledCodeOffset(art::PointerSize::k64).Int32Value())
+ASM_DEFINE(ART_METHOD_METHOD_INDEX_OFFSET,
+ art::ArtMethod::MethodIndexOffset().Int32Value())
+ASM_DEFINE(ART_METHOD_IMT_INDEX_OFFSET,
+ art::ArtMethod::ImtIndexOffset().Int32Value())
+ASM_DEFINE(ART_METHOD_HOTNESS_COUNT_OFFSET,
+ art::ArtMethod::HotnessCountOffset().Int32Value())
diff --git a/tools/cpp-define-generator/asm_defines.def b/tools/cpp-define-generator/asm_defines.def
index 9aad8a42ca..9747844ef8 100644
--- a/tools/cpp-define-generator/asm_defines.def
+++ b/tools/cpp-define-generator/asm_defines.def
@@ -19,7 +19,9 @@
#endif
#include "globals.def"
+#include "art_field.def"
#include "art_method.def"
+#include "code_item.def"
#include "lockword.def"
#include "mirror_array.def"
#include "mirror_class.def"
diff --git a/tools/cpp-define-generator/code_item.def b/tools/cpp-define-generator/code_item.def
new file mode 100644
index 0000000000..01b0e85adf
--- /dev/null
+++ b/tools/cpp-define-generator/code_item.def
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#if ASM_DEFINE_INCLUDE_DEPENDENCIES
+#include "dex/standard_dex_file.h"
+#endif
+
+ASM_DEFINE(CODE_ITEM_REGISTERS_SIZE_OFFSET,
+ art::StandardDexFile::CodeItem::RegistersSizeOffset())
+ASM_DEFINE(CODE_ITEM_INS_SIZE_OFFSET,
+ art::StandardDexFile::CodeItem::InsSizeOffset())
+ASM_DEFINE(CODE_ITEM_OUTS_SIZE_OFFSET,
+ art::StandardDexFile::CodeItem::OutsSizeOffset())
+ASM_DEFINE(CODE_ITEM_INSNS_OFFSET,
+ art::StandardDexFile::CodeItem::InsnsOffset())
diff --git a/tools/cpp-define-generator/globals.def b/tools/cpp-define-generator/globals.def
index 09d33ce756..ca0c8ba363 100644
--- a/tools/cpp-define-generator/globals.def
+++ b/tools/cpp-define-generator/globals.def
@@ -72,3 +72,5 @@ ASM_DEFINE(STACK_REFERENCE_SIZE,
sizeof(art::StackReference<art::mirror::Object>))
ASM_DEFINE(STD_MEMORY_ORDER_RELAXED,
std::memory_order_relaxed)
+ASM_DEFINE(STACK_OVERFLOW_RESERVED_BYTES,
+ GetStackOverflowReservedBytes(art::kRuntimeISA))
diff --git a/tools/cpp-define-generator/mirror_class.def b/tools/cpp-define-generator/mirror_class.def
index c15ae92ece..6df6c41690 100644
--- a/tools/cpp-define-generator/mirror_class.def
+++ b/tools/cpp-define-generator/mirror_class.def
@@ -36,3 +36,11 @@ ASM_DEFINE(MIRROR_CLASS_STATUS_OFFSET,
art::mirror::Class::StatusOffset().Int32Value())
ASM_DEFINE(PRIMITIVE_TYPE_SIZE_SHIFT_SHIFT,
art::mirror::Class::kPrimitiveTypeSizeShiftShift)
+ASM_DEFINE(MIRROR_CLASS_VTABLE_OFFSET_32,
+ art::mirror::Class::EmbeddedVTableOffset(art::PointerSize::k32).Int32Value())
+ASM_DEFINE(MIRROR_CLASS_VTABLE_OFFSET_64,
+ art::mirror::Class::EmbeddedVTableOffset(art::PointerSize::k64).Int32Value())
+ASM_DEFINE(MIRROR_CLASS_IMT_PTR_OFFSET_32,
+ art::mirror::Class::ImtPtrOffset(art::PointerSize::k32).Int32Value())
+ASM_DEFINE(MIRROR_CLASS_IMT_PTR_OFFSET_64,
+ art::mirror::Class::ImtPtrOffset(art::PointerSize::k64).Int32Value())
diff --git a/tools/cpp-define-generator/mirror_object.def b/tools/cpp-define-generator/mirror_object.def
index facb037c97..7d7028b466 100644
--- a/tools/cpp-define-generator/mirror_object.def
+++ b/tools/cpp-define-generator/mirror_object.def
@@ -24,3 +24,10 @@ ASM_DEFINE(MIRROR_OBJECT_HEADER_SIZE,
sizeof(art::mirror::Object))
ASM_DEFINE(MIRROR_OBJECT_LOCK_WORD_OFFSET,
art::mirror::Object::MonitorOffset().Int32Value())
+ASM_DEFINE(GRAY_BYTE_OFFSET,
+ art::mirror::Object::MonitorOffset().Int32Value() +
+ art::LockWord::kReadBarrierStateShift / art::kBitsPerByte)
+ASM_DEFINE(GRAY_BIT_POSITION,
+ art::LockWord::kReadBarrierStateShift % art::kBitsPerByte)
+ASM_DEFINE(READ_BARRIER_TEST_VALUE,
+ static_cast<int8_t>(1 << (art::LockWord::kReadBarrierStateShift % art::kBitsPerByte)))
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))