/*
 * Copyright (C) 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#if ASM_DEFINE_INCLUDE_DEPENDENCIES
#include "base/bit_utils.h"
#include "base/callee_save_type.h"
#include "base/enums.h"
#include "base/globals.h"
#include "dex/modifiers.h"
#include "gc/accounting/card_table.h"
#include "gc/heap.h"
#include "interpreter/mterp/nterp.h"
#include "jit/jit.h"
#include "mirror/object.h"
#include "mirror/object_reference.h"
#include "runtime_globals.h"
#include "stack.h"
#include "entrypoints/quick/callee_save_frame.h"
#endif

ASM_DEFINE(ACCESS_FLAGS_METHOD_IS_NATIVE,
           art::kAccNative)
ASM_DEFINE(ACCESS_FLAGS_METHOD_IS_NATIVE_BIT,
           art::MostSignificantBit(art::kAccNative))
ASM_DEFINE(ACCESS_FLAGS_METHOD_IS_FAST_NATIVE,
           art::kAccFastNative)
ASM_DEFINE(ACCESS_FLAGS_METHOD_IS_CRITICAL_NATIVE,
           art::kAccCriticalNative)
ASM_DEFINE(ACCESS_FLAGS_CLASS_IS_FINALIZABLE,
           art::kAccClassIsFinalizable)
ASM_DEFINE(ACCESS_FLAGS_CLASS_IS_FINALIZABLE_BIT,
           art::MostSignificantBit(art::kAccClassIsFinalizable))
ASM_DEFINE(ACCESS_FLAGS_CLASS_IS_INTERFACE,
           art::kAccInterface)
ASM_DEFINE(ACC_OBSOLETE_METHOD,
           art::kAccObsoleteMethod)
ASM_DEFINE(ACC_OBSOLETE_METHOD_SHIFT,
           art::WhichPowerOf2(art::kAccObsoleteMethod))
ASM_DEFINE(CARD_TABLE_CARD_SHIFT,
           art::gc::accounting::CardTable::kCardShift)
ASM_DEFINE(COMPRESSED_REFERENCE_SIZE,
           sizeof(art::mirror::CompressedReference<art::mirror::Object>))
ASM_DEFINE(COMPRESSED_REFERENCE_SIZE_SHIFT,
           art::WhichPowerOf2(sizeof(art::mirror::CompressedReference<art::mirror::Object>)))
ASM_DEFINE(JIT_CHECK_OSR,
           art::jit::kJitCheckForOSR)
ASM_DEFINE(JIT_HOTNESS_DISABLE,
           art::jit::kJitHotnessDisabled)
ASM_DEFINE(MIN_LARGE_OBJECT_THRESHOLD,
           art::gc::Heap::kMinLargeObjectThreshold)
ASM_DEFINE(NTERP_HANDLER_SIZE,
           art::interpreter::kNterpHandlerSize)
ASM_DEFINE(NTERP_HANDLER_SIZE_LOG2,
           art::WhichPowerOf2(art::interpreter::kNterpHandlerSize))
ASM_DEFINE(NTERP_HOTNESS_VALUE,
           art::interpreter::kNterpHotnessValue)
ASM_DEFINE(OBJECT_ALIGNMENT_MASK,
           art::kObjectAlignment - 1)
ASM_DEFINE(OBJECT_ALIGNMENT_MASK_TOGGLED,
           ~static_cast<uint32_t>(art::kObjectAlignment - 1))
ASM_DEFINE(OBJECT_ALIGNMENT_MASK_TOGGLED64,
           ~static_cast<uint64_t>(art::kObjectAlignment - 1))
ASM_DEFINE(POINTER_SIZE,
           static_cast<size_t>(art::kRuntimePointerSize))
ASM_DEFINE(POINTER_SIZE_SHIFT,
           art::WhichPowerOf2(static_cast<size_t>(art::kRuntimePointerSize)))
ASM_DEFINE(STACK_REFERENCE_SIZE,
           sizeof(art::StackReference<art::mirror::Object>))
ASM_DEFINE(STD_MEMORY_ORDER_RELAXED,
           std::memory_order_relaxed)
ASM_DEFINE(STACK_OVERFLOW_RESERVED_BYTES,
           GetStackOverflowReservedBytes(art::kRuntimeISA))
ASM_DEFINE(CALLEE_SAVE_EVERYTHING_NUM_CORE_SPILLS,
           art::POPCOUNT(art::RuntimeCalleeSaveFrame::GetCoreSpills(
               art::CalleeSaveType::kSaveEverything)))
ASM_DEFINE(TAGGED_JNI_SP_MASK, art::ManagedStack::kTaggedJniSpMask)
ASM_DEFINE(TAGGED_JNI_SP_MASK_TOGGLED32,
           ~static_cast<uint32_t>(art::ManagedStack::kTaggedJniSpMask))
ASM_DEFINE(TAGGED_JNI_SP_MASK_TOGGLED64,
           ~static_cast<uint64_t>(art::ManagedStack::kTaggedJniSpMask))
