blob: ae8f5aabe59071ec19133a2c7abb8eeeec9a1580 [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"
Nicolas Geoffray0315efa2020-06-26 11:42:39 +010025#include "interpreter/mterp/nterp.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
Vladimir Marko86c87522020-05-11 16:55:55 +010033ASM_DEFINE(ACCESS_FLAGS_METHOD_IS_NATIVE,
34 art::kAccNative)
35ASM_DEFINE(ACCESS_FLAGS_METHOD_IS_NATIVE_BIT,
36 art::MostSignificantBit(art::kAccNative))
Vladimir Marko08d09842019-12-02 12:38:49 +000037ASM_DEFINE(ACCESS_FLAGS_METHOD_IS_FAST_NATIVE,
38 art::kAccFastNative)
Vladimir Markofa458ac2020-02-12 14:08:07 +000039ASM_DEFINE(ACCESS_FLAGS_METHOD_IS_CRITICAL_NATIVE,
40 art::kAccCriticalNative)
David Srbecky766e74f2018-10-02 17:12:24 +010041ASM_DEFINE(ACCESS_FLAGS_CLASS_IS_FINALIZABLE,
42 art::kAccClassIsFinalizable)
43ASM_DEFINE(ACCESS_FLAGS_CLASS_IS_FINALIZABLE_BIT,
44 art::MostSignificantBit(art::kAccClassIsFinalizable))
45ASM_DEFINE(ACCESS_FLAGS_CLASS_IS_INTERFACE,
46 art::kAccInterface)
47ASM_DEFINE(ACC_OBSOLETE_METHOD,
48 art::kAccObsoleteMethod)
49ASM_DEFINE(ACC_OBSOLETE_METHOD_SHIFT,
50 art::WhichPowerOf2(art::kAccObsoleteMethod))
51ASM_DEFINE(CARD_TABLE_CARD_SHIFT,
52 art::gc::accounting::CardTable::kCardShift)
53ASM_DEFINE(COMPRESSED_REFERENCE_SIZE,
54 sizeof(art::mirror::CompressedReference<art::mirror::Object>))
55ASM_DEFINE(COMPRESSED_REFERENCE_SIZE_SHIFT,
56 art::WhichPowerOf2(sizeof(art::mirror::CompressedReference<art::mirror::Object>)))
57ASM_DEFINE(JIT_CHECK_OSR,
58 art::jit::kJitCheckForOSR)
59ASM_DEFINE(JIT_HOTNESS_DISABLE,
60 art::jit::kJitHotnessDisabled)
61ASM_DEFINE(MIN_LARGE_OBJECT_THRESHOLD,
62 art::gc::Heap::kMinLargeObjectThreshold)
Nicolas Geoffraye4f983c2021-07-12 15:53:27 +010063ASM_DEFINE(NTERP_HANDLER_SIZE,
64 art::interpreter::kNterpHandlerSize)
65ASM_DEFINE(NTERP_HANDLER_SIZE_LOG2,
66 art::WhichPowerOf2(art::interpreter::kNterpHandlerSize))
David Srbecky766e74f2018-10-02 17:12:24 +010067ASM_DEFINE(OBJECT_ALIGNMENT_MASK,
68 art::kObjectAlignment - 1)
69ASM_DEFINE(OBJECT_ALIGNMENT_MASK_TOGGLED,
70 ~static_cast<uint32_t>(art::kObjectAlignment - 1))
71ASM_DEFINE(OBJECT_ALIGNMENT_MASK_TOGGLED64,
72 ~static_cast<uint64_t>(art::kObjectAlignment - 1))
73ASM_DEFINE(POINTER_SIZE,
74 static_cast<size_t>(art::kRuntimePointerSize))
75ASM_DEFINE(POINTER_SIZE_SHIFT,
76 art::WhichPowerOf2(static_cast<size_t>(art::kRuntimePointerSize)))
77ASM_DEFINE(STACK_REFERENCE_SIZE,
78 sizeof(art::StackReference<art::mirror::Object>))
79ASM_DEFINE(STD_MEMORY_ORDER_RELAXED,
80 std::memory_order_relaxed)
Nicolas Geoffraya00b54b2019-12-03 14:36:42 +000081ASM_DEFINE(STACK_OVERFLOW_RESERVED_BYTES,
82 GetStackOverflowReservedBytes(art::kRuntimeISA))
Nicolas Geoffray0315efa2020-06-26 11:42:39 +010083ASM_DEFINE(NTERP_HOTNESS_MASK,
84 art::interpreter::kNterpHotnessMask)
Nicolas Geoffraydd406c32020-11-22 22:53:18 +000085ASM_DEFINE(NTERP_HOTNESS_BITS,
86 art::POPCOUNT(art::interpreter::kNterpHotnessMask))