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" 19#include "imtable.h" 20#endif 21 22ASM_DEFINE(ART_METHOD_ACCESS_FLAGS_OFFSET, 23 art::ArtMethod::AccessFlagsOffset().Int32Value()) 24ASM_DEFINE(ART_METHOD_IS_MEMORY_SHARED_FLAG, 25 art::kAccMemorySharedMethod) 26ASM_DEFINE(ART_METHOD_IS_MEMORY_SHARED_FLAG_BIT, 27 art::MostSignificantBit(art::kAccMemorySharedMethod)) 28ASM_DEFINE(ART_METHOD_IS_STATIC_FLAG, 29 art::kAccStatic) 30ASM_DEFINE(ART_METHOD_IS_STATIC_FLAG_BIT, 31 art::MostSignificantBit(art::kAccStatic)) 32ASM_DEFINE(ART_METHOD_NTERP_INVOKE_FAST_PATH_FLAG, 33 art::kAccNterpInvokeFastPathFlag) 34ASM_DEFINE(ART_METHOD_NTERP_INVOKE_FAST_PATH_FLAG_BIT, 35 art::MostSignificantBit(art::kAccNterpInvokeFastPathFlag)) 36ASM_DEFINE(ART_METHOD_NTERP_ENTRY_POINT_FAST_PATH_FLAG, 37 art::kAccNterpEntryPointFastPathFlag) 38ASM_DEFINE(ART_METHOD_NTERP_ENTRY_POINT_FAST_PATH_FLAG_BIT, 39 art::MostSignificantBit(art::kAccNterpEntryPointFastPathFlag)) 40ASM_DEFINE(ART_METHOD_IMT_MASK, 41 art::ImTable::kSizeTruncToPowerOfTwo - 1) 42ASM_DEFINE(ART_METHOD_DECLARING_CLASS_OFFSET, 43 art::ArtMethod::DeclaringClassOffset().Int32Value()) 44ASM_DEFINE(ART_METHOD_JNI_OFFSET_32, 45 art::ArtMethod::EntryPointFromJniOffset(art::PointerSize::k32).Int32Value()) 46ASM_DEFINE(ART_METHOD_JNI_OFFSET_64, 47 art::ArtMethod::EntryPointFromJniOffset(art::PointerSize::k64).Int32Value()) 48ASM_DEFINE(ART_METHOD_DATA_OFFSET_32, 49 art::ArtMethod::DataOffset(art::PointerSize::k32).Int32Value()) 50ASM_DEFINE(ART_METHOD_DATA_OFFSET_64, 51 art::ArtMethod::DataOffset(art::PointerSize::k64).Int32Value()) 52ASM_DEFINE(ART_METHOD_QUICK_CODE_OFFSET_32, 53 art::ArtMethod::EntryPointFromQuickCompiledCodeOffset(art::PointerSize::k32).Int32Value()) 54ASM_DEFINE(ART_METHOD_QUICK_CODE_OFFSET_64, 55 art::ArtMethod::EntryPointFromQuickCompiledCodeOffset(art::PointerSize::k64).Int32Value()) 56ASM_DEFINE(ART_METHOD_METHOD_INDEX_OFFSET, 57 art::ArtMethod::MethodIndexOffset().Int32Value()) 58ASM_DEFINE(ART_METHOD_IMT_INDEX_OFFSET, 59 art::ArtMethod::ImtIndexOffset().Int32Value()) 60ASM_DEFINE(ART_METHOD_HOTNESS_COUNT_OFFSET, 61 art::ArtMethod::HotnessCountOffset().Int32Value()) 62