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"
25#include "interpreter/mterp/mterp.h"
26#include "jit/jit.h"
27#include "mirror/object.h"
28#include "mirror/object_reference.h"
29#include "runtime_globals.h"
30#include "stack.h"
31#endif
32
33ASM_DEFINE(ACCESS_FLAGS_METHOD_IS_FAST_NATIVE,
34           art::kAccFastNative)
35ASM_DEFINE(ACCESS_FLAGS_METHOD_IS_CRITICAL_NATIVE,
36           art::kAccCriticalNative)
37ASM_DEFINE(ACCESS_FLAGS_CLASS_IS_FINALIZABLE,
38           art::kAccClassIsFinalizable)
39ASM_DEFINE(ACCESS_FLAGS_CLASS_IS_FINALIZABLE_BIT,
40           art::MostSignificantBit(art::kAccClassIsFinalizable))
41ASM_DEFINE(ACCESS_FLAGS_CLASS_IS_INTERFACE,
42           art::kAccInterface)
43ASM_DEFINE(ACC_OBSOLETE_METHOD,
44           art::kAccObsoleteMethod)
45ASM_DEFINE(ACC_OBSOLETE_METHOD_SHIFT,
46           art::WhichPowerOf2(art::kAccObsoleteMethod))
47ASM_DEFINE(CARD_TABLE_CARD_SHIFT,
48           art::gc::accounting::CardTable::kCardShift)
49ASM_DEFINE(COMPRESSED_REFERENCE_SIZE,
50           sizeof(art::mirror::CompressedReference<art::mirror::Object>))
51ASM_DEFINE(COMPRESSED_REFERENCE_SIZE_SHIFT,
52           art::WhichPowerOf2(sizeof(art::mirror::CompressedReference<art::mirror::Object>)))
53ASM_DEFINE(JIT_CHECK_OSR,
54           art::jit::kJitCheckForOSR)
55ASM_DEFINE(JIT_HOTNESS_DISABLE,
56           art::jit::kJitHotnessDisabled)
57ASM_DEFINE(MIN_LARGE_OBJECT_THRESHOLD,
58           art::gc::Heap::kMinLargeObjectThreshold)
59ASM_DEFINE(MTERP_HANDLER_SIZE,
60           art::interpreter::kMterpHandlerSize)
61ASM_DEFINE(MTERP_HANDLER_SIZE_LOG2,
62           art::WhichPowerOf2(art::interpreter::kMterpHandlerSize))
63ASM_DEFINE(OBJECT_ALIGNMENT_MASK,
64           art::kObjectAlignment - 1)
65ASM_DEFINE(OBJECT_ALIGNMENT_MASK_TOGGLED,
66           ~static_cast<uint32_t>(art::kObjectAlignment - 1))
67ASM_DEFINE(OBJECT_ALIGNMENT_MASK_TOGGLED64,
68           ~static_cast<uint64_t>(art::kObjectAlignment - 1))
69ASM_DEFINE(POINTER_SIZE,
70           static_cast<size_t>(art::kRuntimePointerSize))
71ASM_DEFINE(POINTER_SIZE_SHIFT,
72           art::WhichPowerOf2(static_cast<size_t>(art::kRuntimePointerSize)))
73ASM_DEFINE(STACK_REFERENCE_SIZE,
74           sizeof(art::StackReference<art::mirror::Object>))
75ASM_DEFINE(STD_MEMORY_ORDER_RELAXED,
76           std::memory_order_relaxed)
77ASM_DEFINE(STACK_OVERFLOW_RESERVED_BYTES,
78           GetStackOverflowReservedBytes(art::kRuntimeISA))
79