blob: 6443a0c51743d3b9d2da590f3d03e9455ee90b87 [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"
29#include "stack.h"
30#endif
31
32ASM_DEFINE(ACCESS_FLAGS_CLASS_IS_FINALIZABLE,
33 art::kAccClassIsFinalizable)
34ASM_DEFINE(ACCESS_FLAGS_CLASS_IS_FINALIZABLE_BIT,
35 art::MostSignificantBit(art::kAccClassIsFinalizable))
36ASM_DEFINE(ACCESS_FLAGS_CLASS_IS_INTERFACE,
37 art::kAccInterface)
38ASM_DEFINE(ACC_OBSOLETE_METHOD,
39 art::kAccObsoleteMethod)
40ASM_DEFINE(ACC_OBSOLETE_METHOD_SHIFT,
41 art::WhichPowerOf2(art::kAccObsoleteMethod))
42ASM_DEFINE(CARD_TABLE_CARD_SHIFT,
43 art::gc::accounting::CardTable::kCardShift)
44ASM_DEFINE(COMPRESSED_REFERENCE_SIZE,
45 sizeof(art::mirror::CompressedReference<art::mirror::Object>))
46ASM_DEFINE(COMPRESSED_REFERENCE_SIZE_SHIFT,
47 art::WhichPowerOf2(sizeof(art::mirror::CompressedReference<art::mirror::Object>)))
48ASM_DEFINE(JIT_CHECK_OSR,
49 art::jit::kJitCheckForOSR)
50ASM_DEFINE(JIT_HOTNESS_DISABLE,
51 art::jit::kJitHotnessDisabled)
52ASM_DEFINE(MIN_LARGE_OBJECT_THRESHOLD,
53 art::gc::Heap::kMinLargeObjectThreshold)
David Srbeckyd88f5f72018-10-16 14:22:33 +010054ASM_DEFINE(MTERP_HANDLER_SIZE,
55 art::interpreter::kMterpHandlerSize)
56ASM_DEFINE(MTERP_HANDLER_SIZE_LOG2,
57 art::WhichPowerOf2(art::interpreter::kMterpHandlerSize))
David Srbecky766e74f2018-10-02 17:12:24 +010058ASM_DEFINE(OBJECT_ALIGNMENT_MASK,
59 art::kObjectAlignment - 1)
60ASM_DEFINE(OBJECT_ALIGNMENT_MASK_TOGGLED,
61 ~static_cast<uint32_t>(art::kObjectAlignment - 1))
62ASM_DEFINE(OBJECT_ALIGNMENT_MASK_TOGGLED64,
63 ~static_cast<uint64_t>(art::kObjectAlignment - 1))
64ASM_DEFINE(POINTER_SIZE,
65 static_cast<size_t>(art::kRuntimePointerSize))
66ASM_DEFINE(POINTER_SIZE_SHIFT,
67 art::WhichPowerOf2(static_cast<size_t>(art::kRuntimePointerSize)))
68ASM_DEFINE(STACK_REFERENCE_SIZE,
69 sizeof(art::StackReference<art::mirror::Object>))
70ASM_DEFINE(STD_MEMORY_ORDER_RELAXED,
71 std::memory_order_relaxed)