blob: 97033fcaf231b43d669445e38bc063c936eced97 [file] [log] [blame]
David Srbecky766e74f2018-10-02 17:12:24 +01001/*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#if ASM_DEFINE_INCLUDE_DEPENDENCIES
Nicolas Geoffraya00b54b2019-12-03 14:36:42 +000018#include "entrypoints/quick/quick_entrypoints_enum.h"
David Srbecky766e74f2018-10-02 17:12:24 +010019#include "thread.h"
20#endif
21
David Srbecky766e74f2018-10-02 17:12:24 +010022ASM_DEFINE(THREAD_CARD_TABLE_OFFSET,
23 art::Thread::CardTableOffset<art::kRuntimePointerSize>().Int32Value())
David Srbecky766e74f2018-10-02 17:12:24 +010024ASM_DEFINE(THREAD_EXCEPTION_OFFSET,
25 art::Thread::ExceptionOffset<art::kRuntimePointerSize>().Int32Value())
26ASM_DEFINE(THREAD_FLAGS_OFFSET,
27 art::Thread::ThreadFlagsOffset<art::kRuntimePointerSize>().Int32Value())
28ASM_DEFINE(THREAD_ID_OFFSET,
29 art::Thread::ThinLockIdOffset<art::kRuntimePointerSize>().Int32Value())
30ASM_DEFINE(THREAD_INTERPRETER_CACHE_OFFSET,
31 art::Thread::InterpreterCacheOffset<art::kRuntimePointerSize>().Int32Value())
32ASM_DEFINE(THREAD_INTERPRETER_CACHE_SIZE_LOG2,
Hans Boehm3d2f1482022-01-17 01:32:55 +000033 art::Thread::InterpreterCacheSizeLog2())
Nicolas Geoffraya00b54b2019-12-03 14:36:42 +000034ASM_DEFINE(THREAD_INTERPRETER_CACHE_SIZE_MASK,
Hans Boehm3d2f1482022-01-17 01:32:55 +000035 (sizeof(art::InterpreterCache::Entry) * (art::InterpreterCache::kSize - 1)))
Nicolas Geoffray00391822019-12-10 10:17:23 +000036ASM_DEFINE(THREAD_INTERPRETER_CACHE_SIZE_SHIFT,
David Srbeckyab72f9c2022-02-04 15:47:27 +000037 (art::WhichPowerOf2(sizeof(art::InterpreterCache::Entry)) - 2))
David Srbecky766e74f2018-10-02 17:12:24 +010038ASM_DEFINE(THREAD_IS_GC_MARKING_OFFSET,
39 art::Thread::IsGcMarkingOffset<art::kRuntimePointerSize>().Int32Value())
Mythri Alle307fd6d2022-04-25 10:50:30 +000040ASM_DEFINE(THREAD_DEOPT_CHECK_REQUIRED_OFFSET,
41 art::Thread::DeoptCheckRequiredOffset<art::kRuntimePointerSize>().Int32Value())
David Srbecky766e74f2018-10-02 17:12:24 +010042ASM_DEFINE(THREAD_LOCAL_ALLOC_STACK_END_OFFSET,
43 art::Thread::ThreadLocalAllocStackEndOffset<art::kRuntimePointerSize>().Int32Value())
44ASM_DEFINE(THREAD_LOCAL_ALLOC_STACK_TOP_OFFSET,
45 art::Thread::ThreadLocalAllocStackTopOffset<art::kRuntimePointerSize>().Int32Value())
46ASM_DEFINE(THREAD_LOCAL_END_OFFSET,
47 art::Thread::ThreadLocalEndOffset<art::kRuntimePointerSize>().Int32Value())
48ASM_DEFINE(THREAD_LOCAL_OBJECTS_OFFSET,
49 art::Thread::ThreadLocalObjectsOffset<art::kRuntimePointerSize>().Int32Value())
50ASM_DEFINE(THREAD_LOCAL_POS_OFFSET,
51 art::Thread::ThreadLocalPosOffset<art::kRuntimePointerSize>().Int32Value())
52ASM_DEFINE(THREAD_ROSALLOC_RUNS_OFFSET,
53 art::Thread::RosAllocRunsOffset<art::kRuntimePointerSize>().Int32Value())
54ASM_DEFINE(THREAD_SELF_OFFSET,
55 art::Thread::SelfOffset<art::kRuntimePointerSize>().Int32Value())
56ASM_DEFINE(THREAD_SUSPEND_OR_CHECKPOINT_REQUEST,
Vladimir Marko254a8582021-11-29 14:08:37 +000057 art::Thread::SuspendOrCheckpointRequestFlags())
David Srbecky766e74f2018-10-02 17:12:24 +010058ASM_DEFINE(THREAD_SUSPEND_REQUEST,
Vladimir Markoddf4fd32021-11-22 16:31:57 +000059 static_cast<uint32_t>(art::ThreadFlag::kSuspendRequest))
David Srbecky766e74f2018-10-02 17:12:24 +010060ASM_DEFINE(THREAD_TOP_QUICK_FRAME_OFFSET,
61 art::Thread::TopOfManagedStackOffset<art::kRuntimePointerSize>().Int32Value())
Vladimir Marko7039c112018-04-05 17:59:39 +010062ASM_DEFINE(THREAD_SUSPEND_TRIGGER_OFFSET,
63 art::Thread::ThreadSuspendTriggerOffset<art::kRuntimePointerSize>().Int32Value())
Nicolas Geoffraya00b54b2019-12-03 14:36:42 +000064ASM_DEFINE(THREAD_ALLOC_OBJECT_ENTRYPOINT_OFFSET,
65 art::GetThreadOffset<art::kRuntimePointerSize>(art::kQuickAllocObjectInitialized)
66 .Int32Value())
67ASM_DEFINE(THREAD_ALLOC_ARRAY_ENTRYPOINT_OFFSET,
68 art::GetThreadOffset<art::kRuntimePointerSize>(art::kQuickAllocArrayResolved)
69 .Int32Value())
70ASM_DEFINE(THREAD_READ_BARRIER_MARK_REG00_OFFSET,
71 art::Thread::ReadBarrierMarkEntryPointsOffset<art::kRuntimePointerSize>(0))
Nicolas Geoffrayf9ae8e32022-02-15 22:54:11 +000072ASM_DEFINE(THREAD_SHARED_METHOD_HOTNESS_OFFSET,
73 art::Thread::SharedMethodHotnessOffset<art::kRuntimePointerSize>().Int32Value())
Nicolas Geoffray88d81e02022-08-07 14:48:09 +010074ASM_DEFINE(THREAD_TID_OFFSET,
75 art::Thread::TidOffset<art::kRuntimePointerSize>().Int32Value())