1/*
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/object.h"
19#endif
20
21ASM_DEFINE(MIRROR_OBJECT_CLASS_OFFSET,
22           art::mirror::Object::ClassOffset().Int32Value())
23ASM_DEFINE(MIRROR_OBJECT_HEADER_SIZE,
24           sizeof(art::mirror::Object))
25ASM_DEFINE(MIRROR_OBJECT_LOCK_WORD_OFFSET,
26           art::mirror::Object::MonitorOffset().Int32Value())
27ASM_DEFINE(GRAY_BYTE_OFFSET,
28           art::mirror::Object::MonitorOffset().Int32Value() +
29               art::LockWord::kReadBarrierStateShift / art::kBitsPerByte)
30ASM_DEFINE(GRAY_BIT_POSITION,
31           art::LockWord::kReadBarrierStateShift % art::kBitsPerByte)
32ASM_DEFINE(READ_BARRIER_TEST_VALUE,
33           static_cast<int8_t>(1 << (art::LockWord::kReadBarrierStateShift % art::kBitsPerByte)))
34