blob: 10542622aca03a4191e0b9d299d76711522b108d [file] [log] [blame]
David Srbecky766e74f2018-10-02 17:12:24 +01001/*
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 Srbeckyd88f5f72018-10-16 14:22:33 +010025#include "interpreter/mterp/mterp.h"
David Srbecky766e74f2018-10-02 17:12:24 +010026#include "jit/jit.h"
27#include "mirror/object.h"
28#include "mirror/object_reference.h"
Andreas Gampe5a0430d2019-01-04 14:33:57 -080029#include "runtime_globals.h"
David Srbecky766e74f2018-10-02 17:12:24 +010030#include "stack.h"
31#endif
32
33ASM_DEFINE(ACCESS_FLAGS_CLASS_IS_FINALIZABLE,
34 art::kAccClassIsFinalizable)
35ASM_DEFINE(ACCESS_FLAGS_CLASS_IS_FINALIZABLE_BIT,
36 art::MostSignificantBit(art::kAccClassIsFinalizable))
37ASM_DEFINE(ACCESS_FLAGS_CLASS_IS_INTERFACE,
38 art::kAccInterface)
39ASM_DEFINE(ACC_OBSOLETE_METHOD,
40 art::kAccObsoleteMethod)
41ASM_DEFINE(ACC_OBSOLETE_METHOD_SHIFT,
42 art::WhichPowerOf2(art::kAccObsoleteMethod))
43ASM_DEFINE(CARD_TABLE_CARD_SHIFT,
44 art::gc::accounting::CardTable::kCardShift)
45ASM_DEFINE(COMPRESSED_REFERENCE_SIZE,
46 sizeof(art::mirror::CompressedReference<art::mirror::Object>))
47ASM_DEFINE(COMPRESSED_REFERENCE_SIZE_SHIFT,
48 art::WhichPowerOf2(sizeof(art::mirror::CompressedReference<art::mirror::Object>)))
49ASM_DEFINE(JIT_CHECK_OSR,
50 art::jit::kJitCheckForOSR)
51ASM_DEFINE(JIT_HOTNESS_DISABLE,
52 art::jit::kJitHotnessDisabled)
53ASM_DEFINE(MIN_LARGE_OBJECT_THRESHOLD,
54 art::gc::Heap::kMinLargeObjectThreshold)
David Srbeckyd88f5f72018-10-16 14:22:33 +010055ASM_DEFINE(MTERP_HANDLER_SIZE,
56 art::interpreter::kMterpHandlerSize)
57ASM_DEFINE(MTERP_HANDLER_SIZE_LOG2,
58 art::WhichPowerOf2(art::interpreter::kMterpHandlerSize))
David Srbecky766e74f2018-10-02 17:12:24 +010059ASM_DEFINE(OBJECT_ALIGNMENT_MASK,
60 art::kObjectAlignment - 1)
61ASM_DEFINE(OBJECT_ALIGNMENT_MASK_TOGGLED,
62 ~static_cast<uint32_t>(art::kObjectAlignment - 1))
63ASM_DEFINE(OBJECT_ALIGNMENT_MASK_TOGGLED64,
64 ~static_cast<uint64_t>(art::kObjectAlignment - 1))
65ASM_DEFINE(POINTER_SIZE,
66 static_cast<size_t>(art::kRuntimePointerSize))
67ASM_DEFINE(POINTER_SIZE_SHIFT,
68 art::WhichPowerOf2(static_cast<size_t>(art::kRuntimePointerSize)))
69ASM_DEFINE(STACK_REFERENCE_SIZE,
70 sizeof(art::StackReference<art::mirror::Object>))
71ASM_DEFINE(STD_MEMORY_ORDER_RELAXED,
72 std::memory_order_relaxed)