/*
 * 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 "mirror/class.h"
#include "subtype_check.h"
#endif

ASM_DEFINE(MIRROR_CLASS_ACCESS_FLAGS_OFFSET,
           art::mirror::Class::AccessFlagsOffset().Int32Value())
ASM_DEFINE(MIRROR_CLASS_COMPONENT_TYPE_OFFSET,
           art::mirror::Class::ComponentTypeOffset().Int32Value())
ASM_DEFINE(MIRROR_CLASS_DEX_CACHE_OFFSET,
           art::mirror::Class::DexCacheOffset().Int32Value())
ASM_DEFINE(MIRROR_CLASS_IF_TABLE_OFFSET,
           art::mirror::Class::IfTableOffset().Int32Value())
ASM_DEFINE(MIRROR_CLASS_OBJECT_PRIMITIVE_TYPE_OFFSET,
           art::mirror::Class::PrimitiveTypeOffset().Int32Value())
ASM_DEFINE(MIRROR_CLASS_OBJECT_SIZE_ALLOC_FAST_PATH_OFFSET,
           art::mirror::Class::ObjectSizeAllocFastPathOffset().Int32Value())
ASM_DEFINE(MIRROR_CLASS_OBJECT_SIZE_OFFSET,
           art::mirror::Class::ObjectSizeOffset().Int32Value())
ASM_DEFINE(MIRROR_CLASS_STATUS_OFFSET,
           art::mirror::Class::StatusOffset().Int32Value())
ASM_DEFINE(PRIMITIVE_TYPE_SIZE_SHIFT_SHIFT,
           art::mirror::Class::kPrimitiveTypeSizeShiftShift)
ASM_DEFINE(MIRROR_CLASS_VTABLE_OFFSET_32,
           art::mirror::Class::EmbeddedVTableOffset(art::PointerSize::k32).Int32Value())
ASM_DEFINE(MIRROR_CLASS_VTABLE_OFFSET_64,
           art::mirror::Class::EmbeddedVTableOffset(art::PointerSize::k64).Int32Value())
ASM_DEFINE(MIRROR_CLASS_IMT_PTR_OFFSET_32,
           art::mirror::Class::ImtPtrOffset(art::PointerSize::k32).Int32Value())
ASM_DEFINE(MIRROR_CLASS_IMT_PTR_OFFSET_64,
           art::mirror::Class::ImtPtrOffset(art::PointerSize::k64).Int32Value())
ASM_DEFINE(MIRROR_CLASS_SUPER_CLASS_OFFSET,
           art::mirror::Class::SuperClassOffset().Int32Value())
ASM_DEFINE(MIRROR_CLASS_IS_INTERFACE_FLAG, art::kAccInterface)
ASM_DEFINE(MIRROR_CLASS_IS_INTERFACE_FLAG_BIT,
           art::WhichPowerOf2(art::kAccInterface))
ASM_DEFINE(MIRROR_CLASS_IS_VISIBLY_INITIALIZED_OFFSET,
           art::mirror::Class::StatusOffset().SizeValue() +
               (art::SubtypeCheckBits::BitStructSizeOf() / art::kBitsPerByte))
ASM_DEFINE(MIRROR_CLASS_IS_VISIBLY_INITIALIZED_VALUE,
           art::enum_cast<uint32_t>(art::ClassStatus::kVisiblyInitialized) <<
               (art::SubtypeCheckBits::BitStructSizeOf() % art::kBitsPerByte))
ASM_DEFINE(MIRROR_CLASS_IS_INITIALIZING_VALUE,
           art::enum_cast<uint32_t>(art::ClassStatus::kInitializing) <<
               (art::SubtypeCheckBits::BitStructSizeOf() % art::kBitsPerByte))
ASM_DEFINE(MIRROR_CLASS_IS_INITIALIZED_VALUE,
           art::enum_cast<uint32_t>(art::ClassStatus::kInitialized) <<
               (art::SubtypeCheckBits::BitStructSizeOf() % art::kBitsPerByte))
ASM_DEFINE(MIRROR_CLASS_CLINIT_THREAD_ID_OFFSET,
           art::mirror::Class::ClinitThreadIdOffset().Int32Value())
