/*
 * 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 "entrypoints/quick/quick_entrypoints_enum.h"
#include "thread.h"
#endif

ASM_DEFINE(THREAD_CARD_TABLE_OFFSET,
           art::Thread::CardTableOffset<art::kRuntimePointerSize>().Int32Value())
ASM_DEFINE(THREAD_EXCEPTION_OFFSET,
           art::Thread::ExceptionOffset<art::kRuntimePointerSize>().Int32Value())
ASM_DEFINE(THREAD_FLAGS_OFFSET,
           art::Thread::ThreadFlagsOffset<art::kRuntimePointerSize>().Int32Value())
ASM_DEFINE(THREAD_ID_OFFSET,
           art::Thread::ThinLockIdOffset<art::kRuntimePointerSize>().Int32Value())
ASM_DEFINE(THREAD_INTERPRETER_CACHE_OFFSET,
           art::Thread::InterpreterCacheOffset<art::kRuntimePointerSize>().Int32Value())
ASM_DEFINE(THREAD_INTERPRETER_CACHE_SIZE_LOG2,
           art::Thread::InterpreterCacheSizeLog2())
ASM_DEFINE(THREAD_INTERPRETER_CACHE_SIZE_MASK,
           (sizeof(art::InterpreterCache::Entry) * (art::InterpreterCache::kSize - 1)))
ASM_DEFINE(THREAD_INTERPRETER_CACHE_SIZE_SHIFT,
           (art::WhichPowerOf2(sizeof(art::InterpreterCache::Entry)) - 2))
ASM_DEFINE(THREAD_IS_GC_MARKING_OFFSET,
           art::Thread::IsGcMarkingOffset<art::kRuntimePointerSize>().Int32Value())
ASM_DEFINE(THREAD_DEOPT_CHECK_REQUIRED_OFFSET,
           art::Thread::DeoptCheckRequiredOffset<art::kRuntimePointerSize>().Int32Value())
ASM_DEFINE(THREAD_LOCAL_ALLOC_STACK_END_OFFSET,
           art::Thread::ThreadLocalAllocStackEndOffset<art::kRuntimePointerSize>().Int32Value())
ASM_DEFINE(THREAD_LOCAL_ALLOC_STACK_TOP_OFFSET,
           art::Thread::ThreadLocalAllocStackTopOffset<art::kRuntimePointerSize>().Int32Value())
ASM_DEFINE(THREAD_LOCAL_END_OFFSET,
           art::Thread::ThreadLocalEndOffset<art::kRuntimePointerSize>().Int32Value())
ASM_DEFINE(THREAD_LOCAL_POS_OFFSET,
           art::Thread::ThreadLocalPosOffset<art::kRuntimePointerSize>().Int32Value())
ASM_DEFINE(THREAD_ROSALLOC_RUNS_OFFSET,
           art::Thread::RosAllocRunsOffset<art::kRuntimePointerSize>().Int32Value())
ASM_DEFINE(THREAD_SELF_OFFSET,
           art::Thread::SelfOffset<art::kRuntimePointerSize>().Int32Value())
ASM_DEFINE(THREAD_SUSPEND_OR_CHECKPOINT_REQUEST,
           art::Thread::SuspendOrCheckpointRequestFlags())
ASM_DEFINE(THREAD_SUSPEND_REQUEST,
           static_cast<uint32_t>(art::ThreadFlag::kSuspendRequest))
ASM_DEFINE(THREAD_TOP_QUICK_FRAME_OFFSET,
           art::Thread::TopOfManagedStackOffset<art::kRuntimePointerSize>().Int32Value())
ASM_DEFINE(THREAD_SUSPEND_TRIGGER_OFFSET,
           art::Thread::ThreadSuspendTriggerOffset<art::kRuntimePointerSize>().Int32Value())
ASM_DEFINE(THREAD_ALLOC_OBJECT_ENTRYPOINT_OFFSET,
           art::GetThreadOffset<art::kRuntimePointerSize>(art::kQuickAllocObjectInitialized)
               .Int32Value())
ASM_DEFINE(THREAD_ALLOC_ARRAY_ENTRYPOINT_OFFSET,
           art::GetThreadOffset<art::kRuntimePointerSize>(art::kQuickAllocArrayResolved)
               .Int32Value())
ASM_DEFINE(THREAD_READ_BARRIER_MARK_REG00_OFFSET,
           art::Thread::ReadBarrierMarkEntryPointsOffset<art::kRuntimePointerSize>(0))
ASM_DEFINE(THREAD_SHARED_METHOD_HOTNESS_OFFSET,
           art::Thread::SharedMethodHotnessOffset<art::kRuntimePointerSize>().Int32Value())
ASM_DEFINE(THREAD_TID_OFFSET,
           art::Thread::TidOffset<art::kRuntimePointerSize>().Int32Value())
