David Srbecky | 766e74f | 2018-10-02 17:12:24 +0100 | [diff] [blame] | 1 | /* |
| 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 Geoffray | a00b54b | 2019-12-03 14:36:42 +0000 | [diff] [blame] | 18 | #include "entrypoints/quick/quick_entrypoints_enum.h" |
David Srbecky | 766e74f | 2018-10-02 17:12:24 +0100 | [diff] [blame] | 19 | #include "thread.h" |
| 20 | #endif |
| 21 | |
David Srbecky | 766e74f | 2018-10-02 17:12:24 +0100 | [diff] [blame] | 22 | ASM_DEFINE(THREAD_CARD_TABLE_OFFSET, |
| 23 | art::Thread::CardTableOffset<art::kRuntimePointerSize>().Int32Value()) |
| 24 | ASM_DEFINE(THREAD_CHECKPOINT_REQUEST, |
| 25 | art::kCheckpointRequest) |
| 26 | ASM_DEFINE(THREAD_CURRENT_IBASE_OFFSET, |
| 27 | art::Thread::MterpCurrentIBaseOffset<art::kRuntimePointerSize>().Int32Value()) |
David Srbecky | 766e74f | 2018-10-02 17:12:24 +0100 | [diff] [blame] | 28 | ASM_DEFINE(THREAD_EMPTY_CHECKPOINT_REQUEST, |
| 29 | art::kEmptyCheckpointRequest) |
| 30 | ASM_DEFINE(THREAD_EXCEPTION_OFFSET, |
| 31 | art::Thread::ExceptionOffset<art::kRuntimePointerSize>().Int32Value()) |
| 32 | ASM_DEFINE(THREAD_FLAGS_OFFSET, |
| 33 | art::Thread::ThreadFlagsOffset<art::kRuntimePointerSize>().Int32Value()) |
| 34 | ASM_DEFINE(THREAD_ID_OFFSET, |
| 35 | art::Thread::ThinLockIdOffset<art::kRuntimePointerSize>().Int32Value()) |
| 36 | ASM_DEFINE(THREAD_INTERPRETER_CACHE_OFFSET, |
| 37 | art::Thread::InterpreterCacheOffset<art::kRuntimePointerSize>().Int32Value()) |
| 38 | ASM_DEFINE(THREAD_INTERPRETER_CACHE_SIZE_LOG2, |
| 39 | art::Thread::InterpreterCacheSizeLog2()) |
Nicolas Geoffray | a00b54b | 2019-12-03 14:36:42 +0000 | [diff] [blame] | 40 | ASM_DEFINE(THREAD_INTERPRETER_CACHE_SIZE_MASK, |
| 41 | (sizeof(art::InterpreterCache::Entry) * (art::InterpreterCache::kSize - 1))) |
Nicolas Geoffray | 0039182 | 2019-12-10 10:17:23 +0000 | [diff] [blame] | 42 | ASM_DEFINE(THREAD_INTERPRETER_CACHE_SIZE_SHIFT, |
| 43 | 2) |
David Srbecky | 766e74f | 2018-10-02 17:12:24 +0100 | [diff] [blame] | 44 | ASM_DEFINE(THREAD_IS_GC_MARKING_OFFSET, |
| 45 | art::Thread::IsGcMarkingOffset<art::kRuntimePointerSize>().Int32Value()) |
| 46 | ASM_DEFINE(THREAD_LOCAL_ALLOC_STACK_END_OFFSET, |
| 47 | art::Thread::ThreadLocalAllocStackEndOffset<art::kRuntimePointerSize>().Int32Value()) |
| 48 | ASM_DEFINE(THREAD_LOCAL_ALLOC_STACK_TOP_OFFSET, |
| 49 | art::Thread::ThreadLocalAllocStackTopOffset<art::kRuntimePointerSize>().Int32Value()) |
| 50 | ASM_DEFINE(THREAD_LOCAL_END_OFFSET, |
| 51 | art::Thread::ThreadLocalEndOffset<art::kRuntimePointerSize>().Int32Value()) |
| 52 | ASM_DEFINE(THREAD_LOCAL_OBJECTS_OFFSET, |
| 53 | art::Thread::ThreadLocalObjectsOffset<art::kRuntimePointerSize>().Int32Value()) |
| 54 | ASM_DEFINE(THREAD_LOCAL_POS_OFFSET, |
| 55 | art::Thread::ThreadLocalPosOffset<art::kRuntimePointerSize>().Int32Value()) |
| 56 | ASM_DEFINE(THREAD_ROSALLOC_RUNS_OFFSET, |
| 57 | art::Thread::RosAllocRunsOffset<art::kRuntimePointerSize>().Int32Value()) |
| 58 | ASM_DEFINE(THREAD_SELF_OFFSET, |
| 59 | art::Thread::SelfOffset<art::kRuntimePointerSize>().Int32Value()) |
| 60 | ASM_DEFINE(THREAD_SUSPEND_OR_CHECKPOINT_REQUEST, |
| 61 | art::kSuspendRequest | art::kCheckpointRequest | art::kEmptyCheckpointRequest) |
| 62 | ASM_DEFINE(THREAD_SUSPEND_REQUEST, |
| 63 | art::kSuspendRequest) |
David Srbecky | 28f6cff | 2018-10-16 15:07:28 +0100 | [diff] [blame] | 64 | ASM_DEFINE(THREAD_USE_MTERP_OFFSET, |
| 65 | art::Thread::UseMterpOffset<art::kRuntimePointerSize>().Int32Value()) |
David Srbecky | 766e74f | 2018-10-02 17:12:24 +0100 | [diff] [blame] | 66 | ASM_DEFINE(THREAD_TOP_QUICK_FRAME_OFFSET, |
| 67 | art::Thread::TopOfManagedStackOffset<art::kRuntimePointerSize>().Int32Value()) |
Nicolas Geoffray | a00b54b | 2019-12-03 14:36:42 +0000 | [diff] [blame] | 68 | ASM_DEFINE(THREAD_ALLOC_OBJECT_ENTRYPOINT_OFFSET, |
| 69 | art::GetThreadOffset<art::kRuntimePointerSize>(art::kQuickAllocObjectInitialized) |
| 70 | .Int32Value()) |
| 71 | ASM_DEFINE(THREAD_ALLOC_ARRAY_ENTRYPOINT_OFFSET, |
| 72 | art::GetThreadOffset<art::kRuntimePointerSize>(art::kQuickAllocArrayResolved) |
| 73 | .Int32Value()) |
| 74 | ASM_DEFINE(THREAD_READ_BARRIER_MARK_REG00_OFFSET, |
| 75 | art::Thread::ReadBarrierMarkEntryPointsOffset<art::kRuntimePointerSize>(0)) |