blob: 459e5a816485d8a11717595118289e3754ecd92f [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"
Mythri Alle307fd6d2022-04-25 10:50:30 +000031#include "entrypoints/quick/callee_save_frame.h"
David Srbecky766e74f2018-10-02 17:12:24 +010032#endif
33
Vladimir Marko86c87522020-05-11 16:55:55 +010034ASM_DEFINE(ACCESS_FLAGS_METHOD_IS_NATIVE,
35 art::kAccNative)
36ASM_DEFINE(ACCESS_FLAGS_METHOD_IS_NATIVE_BIT,
37 art::MostSignificantBit(art::kAccNative))
Vladimir Marko08d09842019-12-02 12:38:49 +000038ASM_DEFINE(ACCESS_FLAGS_METHOD_IS_FAST_NATIVE,
39 art::kAccFastNative)
Vladimir Markofa458ac2020-02-12 14:08:07 +000040ASM_DEFINE(ACCESS_FLAGS_METHOD_IS_CRITICAL_NATIVE,
41 art::kAccCriticalNative)
David Srbecky766e74f2018-10-02 17:12:24 +010042ASM_DEFINE(ACCESS_FLAGS_CLASS_IS_FINALIZABLE,
43 art::kAccClassIsFinalizable)
44ASM_DEFINE(ACCESS_FLAGS_CLASS_IS_FINALIZABLE_BIT,
45 art::MostSignificantBit(art::kAccClassIsFinalizable))
46ASM_DEFINE(ACCESS_FLAGS_CLASS_IS_INTERFACE,
47 art::kAccInterface)
48ASM_DEFINE(ACC_OBSOLETE_METHOD,
49 art::kAccObsoleteMethod)
50ASM_DEFINE(ACC_OBSOLETE_METHOD_SHIFT,
51 art::WhichPowerOf2(art::kAccObsoleteMethod))
52ASM_DEFINE(CARD_TABLE_CARD_SHIFT,
53 art::gc::accounting::CardTable::kCardShift)
54ASM_DEFINE(COMPRESSED_REFERENCE_SIZE,
55 sizeof(art::mirror::CompressedReference<art::mirror::Object>))
56ASM_DEFINE(COMPRESSED_REFERENCE_SIZE_SHIFT,
57 art::WhichPowerOf2(sizeof(art::mirror::CompressedReference<art::mirror::Object>)))
58ASM_DEFINE(JIT_CHECK_OSR,
59 art::jit::kJitCheckForOSR)
60ASM_DEFINE(JIT_HOTNESS_DISABLE,
61 art::jit::kJitHotnessDisabled)
62ASM_DEFINE(MIN_LARGE_OBJECT_THRESHOLD,
63 art::gc::Heap::kMinLargeObjectThreshold)
Nicolas Geoffraye4f983c2021-07-12 15:53:27 +010064ASM_DEFINE(NTERP_HANDLER_SIZE,
65 art::interpreter::kNterpHandlerSize)
66ASM_DEFINE(NTERP_HANDLER_SIZE_LOG2,
67 art::WhichPowerOf2(art::interpreter::kNterpHandlerSize))
Nicolas Geoffray61673dc2021-11-06 13:58:31 +000068ASM_DEFINE(NTERP_HOTNESS_VALUE,
69 art::interpreter::kNterpHotnessValue)
David Srbecky766e74f2018-10-02 17:12:24 +010070ASM_DEFINE(OBJECT_ALIGNMENT_MASK,
71 art::kObjectAlignment - 1)
72ASM_DEFINE(OBJECT_ALIGNMENT_MASK_TOGGLED,
73 ~static_cast<uint32_t>(art::kObjectAlignment - 1))
74ASM_DEFINE(OBJECT_ALIGNMENT_MASK_TOGGLED64,
75 ~static_cast<uint64_t>(art::kObjectAlignment - 1))
76ASM_DEFINE(POINTER_SIZE,
77 static_cast<size_t>(art::kRuntimePointerSize))
78ASM_DEFINE(POINTER_SIZE_SHIFT,
79 art::WhichPowerOf2(static_cast<size_t>(art::kRuntimePointerSize)))
80ASM_DEFINE(STACK_REFERENCE_SIZE,
81 sizeof(art::StackReference<art::mirror::Object>))
82ASM_DEFINE(STD_MEMORY_ORDER_RELAXED,
83 std::memory_order_relaxed)
Nicolas Geoffraya00b54b2019-12-03 14:36:42 +000084ASM_DEFINE(STACK_OVERFLOW_RESERVED_BYTES,
85 GetStackOverflowReservedBytes(art::kRuntimeISA))
Mythri Alle307fd6d2022-04-25 10:50:30 +000086ASM_DEFINE(CALLEE_SAVE_EVERYTHING_NUM_CORE_SPILLS,
87 art::POPCOUNT(art::RuntimeCalleeSaveFrame::GetCoreSpills(
88 art::CalleeSaveType::kSaveEverything)))
Mythri Allec2632ac2022-05-13 14:37:52 +000089ASM_DEFINE(TAGGED_JNI_SP_MASK, art::ManagedStack::kTaggedJniSpMask)
90ASM_DEFINE(TAGGED_JNI_SP_MASK_TOGGLED32,
91 ~static_cast<uint32_t>(art::ManagedStack::kTaggedJniSpMask))
92ASM_DEFINE(TAGGED_JNI_SP_MASK_TOGGLED64,
93 ~static_cast<uint64_t>(art::ManagedStack::kTaggedJniSpMask))