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 "base/bit_utils.h" |
| 19 | #include "base/callee_save_type.h" |
| 20 | #include "base/enums.h" |
| 21 | #include "base/globals.h" |
| 22 | #include "dex/modifiers.h" |
| 23 | #include "gc/accounting/card_table.h" |
| 24 | #include "gc/heap.h" |
David Srbecky | d88f5f7 | 2018-10-16 14:22:33 +0100 | [diff] [blame] | 25 | #include "interpreter/mterp/mterp.h" |
Nicolas Geoffray | 0315efa | 2020-06-26 11:42:39 +0100 | [diff] [blame] | 26 | #include "interpreter/mterp/nterp.h" |
David Srbecky | 766e74f | 2018-10-02 17:12:24 +0100 | [diff] [blame] | 27 | #include "jit/jit.h" |
| 28 | #include "mirror/object.h" |
| 29 | #include "mirror/object_reference.h" |
Andreas Gampe | 5a0430d | 2019-01-04 14:33:57 -0800 | [diff] [blame] | 30 | #include "runtime_globals.h" |
David Srbecky | 766e74f | 2018-10-02 17:12:24 +0100 | [diff] [blame] | 31 | #include "stack.h" |
| 32 | #endif |
| 33 | |
Vladimir Marko | 86c8752 | 2020-05-11 16:55:55 +0100 | [diff] [blame] | 34 | ASM_DEFINE(ACCESS_FLAGS_METHOD_IS_NATIVE, |
| 35 | art::kAccNative) |
| 36 | ASM_DEFINE(ACCESS_FLAGS_METHOD_IS_NATIVE_BIT, |
| 37 | art::MostSignificantBit(art::kAccNative)) |
Vladimir Marko | 08d0984 | 2019-12-02 12:38:49 +0000 | [diff] [blame] | 38 | ASM_DEFINE(ACCESS_FLAGS_METHOD_IS_FAST_NATIVE, |
| 39 | art::kAccFastNative) |
Vladimir Marko | fa458ac | 2020-02-12 14:08:07 +0000 | [diff] [blame] | 40 | ASM_DEFINE(ACCESS_FLAGS_METHOD_IS_CRITICAL_NATIVE, |
| 41 | art::kAccCriticalNative) |
David Srbecky | 766e74f | 2018-10-02 17:12:24 +0100 | [diff] [blame] | 42 | ASM_DEFINE(ACCESS_FLAGS_CLASS_IS_FINALIZABLE, |
| 43 | art::kAccClassIsFinalizable) |
| 44 | ASM_DEFINE(ACCESS_FLAGS_CLASS_IS_FINALIZABLE_BIT, |
| 45 | art::MostSignificantBit(art::kAccClassIsFinalizable)) |
| 46 | ASM_DEFINE(ACCESS_FLAGS_CLASS_IS_INTERFACE, |
| 47 | art::kAccInterface) |
| 48 | ASM_DEFINE(ACC_OBSOLETE_METHOD, |
| 49 | art::kAccObsoleteMethod) |
| 50 | ASM_DEFINE(ACC_OBSOLETE_METHOD_SHIFT, |
| 51 | art::WhichPowerOf2(art::kAccObsoleteMethod)) |
| 52 | ASM_DEFINE(CARD_TABLE_CARD_SHIFT, |
| 53 | art::gc::accounting::CardTable::kCardShift) |
| 54 | ASM_DEFINE(COMPRESSED_REFERENCE_SIZE, |
| 55 | sizeof(art::mirror::CompressedReference<art::mirror::Object>)) |
| 56 | ASM_DEFINE(COMPRESSED_REFERENCE_SIZE_SHIFT, |
| 57 | art::WhichPowerOf2(sizeof(art::mirror::CompressedReference<art::mirror::Object>))) |
| 58 | ASM_DEFINE(JIT_CHECK_OSR, |
| 59 | art::jit::kJitCheckForOSR) |
| 60 | ASM_DEFINE(JIT_HOTNESS_DISABLE, |
| 61 | art::jit::kJitHotnessDisabled) |
| 62 | ASM_DEFINE(MIN_LARGE_OBJECT_THRESHOLD, |
| 63 | art::gc::Heap::kMinLargeObjectThreshold) |
David Srbecky | d88f5f7 | 2018-10-16 14:22:33 +0100 | [diff] [blame] | 64 | ASM_DEFINE(MTERP_HANDLER_SIZE, |
| 65 | art::interpreter::kMterpHandlerSize) |
| 66 | ASM_DEFINE(MTERP_HANDLER_SIZE_LOG2, |
| 67 | art::WhichPowerOf2(art::interpreter::kMterpHandlerSize)) |
David Srbecky | 766e74f | 2018-10-02 17:12:24 +0100 | [diff] [blame] | 68 | ASM_DEFINE(OBJECT_ALIGNMENT_MASK, |
| 69 | art::kObjectAlignment - 1) |
| 70 | ASM_DEFINE(OBJECT_ALIGNMENT_MASK_TOGGLED, |
| 71 | ~static_cast<uint32_t>(art::kObjectAlignment - 1)) |
| 72 | ASM_DEFINE(OBJECT_ALIGNMENT_MASK_TOGGLED64, |
| 73 | ~static_cast<uint64_t>(art::kObjectAlignment - 1)) |
| 74 | ASM_DEFINE(POINTER_SIZE, |
| 75 | static_cast<size_t>(art::kRuntimePointerSize)) |
| 76 | ASM_DEFINE(POINTER_SIZE_SHIFT, |
| 77 | art::WhichPowerOf2(static_cast<size_t>(art::kRuntimePointerSize))) |
| 78 | ASM_DEFINE(STACK_REFERENCE_SIZE, |
| 79 | sizeof(art::StackReference<art::mirror::Object>)) |
| 80 | ASM_DEFINE(STD_MEMORY_ORDER_RELAXED, |
| 81 | std::memory_order_relaxed) |
Nicolas Geoffray | a00b54b | 2019-12-03 14:36:42 +0000 | [diff] [blame] | 82 | ASM_DEFINE(STACK_OVERFLOW_RESERVED_BYTES, |
| 83 | GetStackOverflowReservedBytes(art::kRuntimeISA)) |
Nicolas Geoffray | 0315efa | 2020-06-26 11:42:39 +0100 | [diff] [blame] | 84 | ASM_DEFINE(NTERP_HOTNESS_MASK, |
| 85 | art::interpreter::kNterpHotnessMask) |