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 |
| 18 | #include "art_method.h" |
Nicolas Geoffray | d5a8695 | 2021-01-19 10:35:54 +0000 | [diff] [blame] | 19 | #include "imtable.h" |
David Srbecky | 766e74f | 2018-10-02 17:12:24 +0100 | [diff] [blame] | 20 | #endif |
| 21 | |
| 22 | ASM_DEFINE(ART_METHOD_ACCESS_FLAGS_OFFSET, |
| 23 | art::ArtMethod::AccessFlagsOffset().Int32Value()) |
Nicolas Geoffray | f9ae8e3 | 2022-02-15 22:54:11 +0000 | [diff] [blame] | 24 | ASM_DEFINE(ART_METHOD_IS_MEMORY_SHARED_FLAG, |
| 25 | art::kAccMemorySharedMethod) |
| 26 | ASM_DEFINE(ART_METHOD_IS_MEMORY_SHARED_FLAG_BIT, |
| 27 | art::MostSignificantBit(art::kAccMemorySharedMethod)) |
Nicolas Geoffray | a00b54b | 2019-12-03 14:36:42 +0000 | [diff] [blame] | 28 | ASM_DEFINE(ART_METHOD_IS_STATIC_FLAG, |
| 29 | art::kAccStatic) |
Nicolas Geoffray | e585964 | 2021-01-08 18:09:36 +0000 | [diff] [blame] | 30 | ASM_DEFINE(ART_METHOD_IS_STATIC_FLAG_BIT, |
| 31 | art::MostSignificantBit(art::kAccStatic)) |
Nicolas Geoffray | 43c9cd7 | 2021-03-10 15:09:19 +0000 | [diff] [blame] | 32 | ASM_DEFINE(ART_METHOD_NTERP_INVOKE_FAST_PATH_FLAG, |
| 33 | art::kAccNterpInvokeFastPathFlag) |
| 34 | ASM_DEFINE(ART_METHOD_NTERP_INVOKE_FAST_PATH_FLAG_BIT, |
| 35 | art::MostSignificantBit(art::kAccNterpInvokeFastPathFlag)) |
| 36 | ASM_DEFINE(ART_METHOD_NTERP_ENTRY_POINT_FAST_PATH_FLAG, |
| 37 | art::kAccNterpEntryPointFastPathFlag) |
Nicolas Geoffray | 40cd07c | 2021-03-15 18:33:23 +0000 | [diff] [blame] | 38 | ASM_DEFINE(ART_METHOD_NTERP_ENTRY_POINT_FAST_PATH_FLAG_BIT, |
| 39 | art::MostSignificantBit(art::kAccNterpEntryPointFastPathFlag)) |
Nicolas Geoffray | 43c9cd7 | 2021-03-10 15:09:19 +0000 | [diff] [blame] | 40 | ASM_DEFINE(ART_METHOD_IMT_MASK, |
| 41 | art::ImTable::kSizeTruncToPowerOfTwo - 1) |
David Srbecky | 766e74f | 2018-10-02 17:12:24 +0100 | [diff] [blame] | 42 | ASM_DEFINE(ART_METHOD_DECLARING_CLASS_OFFSET, |
| 43 | art::ArtMethod::DeclaringClassOffset().Int32Value()) |
| 44 | ASM_DEFINE(ART_METHOD_JNI_OFFSET_32, |
| 45 | art::ArtMethod::EntryPointFromJniOffset(art::PointerSize::k32).Int32Value()) |
| 46 | ASM_DEFINE(ART_METHOD_JNI_OFFSET_64, |
| 47 | art::ArtMethod::EntryPointFromJniOffset(art::PointerSize::k64).Int32Value()) |
Nicolas Geoffray | 4717175 | 2020-08-31 15:03:20 +0100 | [diff] [blame] | 48 | ASM_DEFINE(ART_METHOD_DATA_OFFSET_32, |
| 49 | art::ArtMethod::DataOffset(art::PointerSize::k32).Int32Value()) |
| 50 | ASM_DEFINE(ART_METHOD_DATA_OFFSET_64, |
| 51 | art::ArtMethod::DataOffset(art::PointerSize::k64).Int32Value()) |
David Srbecky | 766e74f | 2018-10-02 17:12:24 +0100 | [diff] [blame] | 52 | ASM_DEFINE(ART_METHOD_QUICK_CODE_OFFSET_32, |
| 53 | art::ArtMethod::EntryPointFromQuickCompiledCodeOffset(art::PointerSize::k32).Int32Value()) |
| 54 | ASM_DEFINE(ART_METHOD_QUICK_CODE_OFFSET_64, |
| 55 | art::ArtMethod::EntryPointFromQuickCompiledCodeOffset(art::PointerSize::k64).Int32Value()) |
Nicolas Geoffray | a00b54b | 2019-12-03 14:36:42 +0000 | [diff] [blame] | 56 | ASM_DEFINE(ART_METHOD_METHOD_INDEX_OFFSET, |
| 57 | art::ArtMethod::MethodIndexOffset().Int32Value()) |
| 58 | ASM_DEFINE(ART_METHOD_IMT_INDEX_OFFSET, |
| 59 | art::ArtMethod::ImtIndexOffset().Int32Value()) |
| 60 | ASM_DEFINE(ART_METHOD_HOTNESS_COUNT_OFFSET, |
| 61 | art::ArtMethod::HotnessCountOffset().Int32Value()) |