blob: 062a7aa4b7fa6ed0d51591f8ea546e2c738704ea [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 "mirror/class.h"
Nicolas Geoffray8af7f912022-07-06 15:29:16 +010019#include "subtype_check.h"
David Srbecky766e74f2018-10-02 17:12:24 +010020#endif
21
22ASM_DEFINE(MIRROR_CLASS_ACCESS_FLAGS_OFFSET,
23 art::mirror::Class::AccessFlagsOffset().Int32Value())
24ASM_DEFINE(MIRROR_CLASS_COMPONENT_TYPE_OFFSET,
25 art::mirror::Class::ComponentTypeOffset().Int32Value())
26ASM_DEFINE(MIRROR_CLASS_DEX_CACHE_OFFSET,
27 art::mirror::Class::DexCacheOffset().Int32Value())
28ASM_DEFINE(MIRROR_CLASS_IF_TABLE_OFFSET,
29 art::mirror::Class::IfTableOffset().Int32Value())
30ASM_DEFINE(MIRROR_CLASS_OBJECT_PRIMITIVE_TYPE_OFFSET,
31 art::mirror::Class::PrimitiveTypeOffset().Int32Value())
32ASM_DEFINE(MIRROR_CLASS_OBJECT_SIZE_ALLOC_FAST_PATH_OFFSET,
33 art::mirror::Class::ObjectSizeAllocFastPathOffset().Int32Value())
34ASM_DEFINE(MIRROR_CLASS_OBJECT_SIZE_OFFSET,
35 art::mirror::Class::ObjectSizeOffset().Int32Value())
36ASM_DEFINE(MIRROR_CLASS_STATUS_OFFSET,
37 art::mirror::Class::StatusOffset().Int32Value())
38ASM_DEFINE(PRIMITIVE_TYPE_SIZE_SHIFT_SHIFT,
39 art::mirror::Class::kPrimitiveTypeSizeShiftShift)
Nicolas Geoffraya00b54b2019-12-03 14:36:42 +000040ASM_DEFINE(MIRROR_CLASS_VTABLE_OFFSET_32,
41 art::mirror::Class::EmbeddedVTableOffset(art::PointerSize::k32).Int32Value())
42ASM_DEFINE(MIRROR_CLASS_VTABLE_OFFSET_64,
43 art::mirror::Class::EmbeddedVTableOffset(art::PointerSize::k64).Int32Value())
44ASM_DEFINE(MIRROR_CLASS_IMT_PTR_OFFSET_32,
45 art::mirror::Class::ImtPtrOffset(art::PointerSize::k32).Int32Value())
46ASM_DEFINE(MIRROR_CLASS_IMT_PTR_OFFSET_64,
47 art::mirror::Class::ImtPtrOffset(art::PointerSize::k64).Int32Value())
Nicolas Geoffrayc2b31162021-12-06 09:08:33 +000048ASM_DEFINE(MIRROR_CLASS_SUPER_CLASS_OFFSET,
49 art::mirror::Class::SuperClassOffset().Int32Value())
50ASM_DEFINE(MIRROR_CLASS_IS_INTERFACE_FLAG, art::kAccInterface)
51ASM_DEFINE(MIRROR_CLASS_IS_INTERFACE_FLAG_BIT,
52 art::WhichPowerOf2(art::kAccInterface))
Nicolas Geoffray8af7f912022-07-06 15:29:16 +010053ASM_DEFINE(MIRROR_CLASS_IS_VISIBLY_INITIALIZED_OFFSET,
54 art::mirror::Class::StatusOffset().SizeValue() +
55 (art::SubtypeCheckBits::BitStructSizeOf() / art::kBitsPerByte))
56ASM_DEFINE(MIRROR_CLASS_IS_VISIBLY_INITIALIZED_VALUE,
57 art::enum_cast<uint32_t>(art::ClassStatus::kVisiblyInitialized) <<
58 (art::SubtypeCheckBits::BitStructSizeOf() % art::kBitsPerByte))
Nicolas Geoffray88d81e02022-08-07 14:48:09 +010059ASM_DEFINE(MIRROR_CLASS_IS_INITIALIZING_VALUE,
60 art::enum_cast<uint32_t>(art::ClassStatus::kInitializing) <<
61 (art::SubtypeCheckBits::BitStructSizeOf() % art::kBitsPerByte))
Nicolas Geoffray93455a02022-09-05 15:17:22 +000062ASM_DEFINE(MIRROR_CLASS_IS_INITIALIZED_VALUE,
63 art::enum_cast<uint32_t>(art::ClassStatus::kInitialized) <<
64 (art::SubtypeCheckBits::BitStructSizeOf() % art::kBitsPerByte))
Nicolas Geoffray88d81e02022-08-07 14:48:09 +010065ASM_DEFINE(MIRROR_CLASS_CLINIT_THREAD_ID_OFFSET,
66 art::mirror::Class::ClinitThreadIdOffset().Int32Value())