Igor Murashkin | 311fdf5 | 2016-07-22 15:59:16 -0700 | [diff] [blame] | 1 | |
| 2 | /* |
| 3 | * Copyright (C) 2016 The Android Open Source Project |
| 4 | * |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at |
| 8 | * |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | */ |
| 17 | |
| 18 | #ifndef ART_RUNTIME_GENERATED_ASM_SUPPORT_GEN_H_ |
| 19 | #define ART_RUNTIME_GENERATED_ASM_SUPPORT_GEN_H_ |
| 20 | |
| 21 | // This file has been auto-generated by cpp-define-generator; do not edit directly. |
| 22 | |
| 23 | #define STACK_REFERENCE_SIZE 0x4 |
| 24 | DEFINE_CHECK_EQ(static_cast<size_t>(STACK_REFERENCE_SIZE), (static_cast<size_t>(sizeof(art::StackReference<art::mirror::Object>)))) |
| 25 | #define COMPRESSED_REFERENCE_SIZE 0x4 |
| 26 | DEFINE_CHECK_EQ(static_cast<size_t>(COMPRESSED_REFERENCE_SIZE), (static_cast<size_t>(sizeof(art::mirror::CompressedReference<art::mirror::Object>)))) |
| 27 | #define COMPRESSED_REFERENCE_SIZE_SHIFT 0x2 |
| 28 | DEFINE_CHECK_EQ(static_cast<size_t>(COMPRESSED_REFERENCE_SIZE_SHIFT), (static_cast<size_t>(art::WhichPowerOf2(sizeof(art::mirror::CompressedReference<art::mirror::Object>))))) |
Vladimir Marko | fd36f1f | 2016-08-03 18:49:58 +0100 | [diff] [blame^] | 29 | #define RUNTIME_SAVE_ALL_CALLEE_SAVES_METHOD_OFFSET 0 |
| 30 | DEFINE_CHECK_EQ(static_cast<size_t>(RUNTIME_SAVE_ALL_CALLEE_SAVES_METHOD_OFFSET), (static_cast<size_t>(art::Runtime::GetCalleeSaveMethodOffset(art::Runtime:: kSaveAllCalleeSaves)))) |
| 31 | #define RUNTIME_SAVE_REFS_ONLY_METHOD_OFFSET 0x8 |
| 32 | DEFINE_CHECK_EQ(static_cast<size_t>(RUNTIME_SAVE_REFS_ONLY_METHOD_OFFSET), (static_cast<size_t>(art::Runtime::GetCalleeSaveMethodOffset(art::Runtime:: kSaveRefsOnly)))) |
| 33 | #define RUNTIME_SAVE_REFS_AND_ARGS_METHOD_OFFSET 0x10 |
| 34 | DEFINE_CHECK_EQ(static_cast<size_t>(RUNTIME_SAVE_REFS_AND_ARGS_METHOD_OFFSET), (static_cast<size_t>(art::Runtime::GetCalleeSaveMethodOffset(art::Runtime:: kSaveRefsAndArgs)))) |
| 35 | #define RUNTIME_SAVE_EVERYTHING_METHOD_OFFSET 0x18 |
| 36 | DEFINE_CHECK_EQ(static_cast<size_t>(RUNTIME_SAVE_EVERYTHING_METHOD_OFFSET), (static_cast<size_t>(art::Runtime::GetCalleeSaveMethodOffset(art::Runtime:: kSaveEverything)))) |
Igor Murashkin | 311fdf5 | 2016-07-22 15:59:16 -0700 | [diff] [blame] | 37 | #define THREAD_FLAGS_OFFSET 0 |
Andreas Gampe | 542451c | 2016-07-26 09:02:02 -0700 | [diff] [blame] | 38 | DEFINE_CHECK_EQ(static_cast<int32_t>(THREAD_FLAGS_OFFSET), (static_cast<int32_t>(art::Thread:: ThreadFlagsOffset<art::kRuntimePointerSize>().Int32Value()))) |
Igor Murashkin | 311fdf5 | 2016-07-22 15:59:16 -0700 | [diff] [blame] | 39 | #define THREAD_ID_OFFSET 12 |
Andreas Gampe | 542451c | 2016-07-26 09:02:02 -0700 | [diff] [blame] | 40 | DEFINE_CHECK_EQ(static_cast<int32_t>(THREAD_ID_OFFSET), (static_cast<int32_t>(art::Thread:: ThinLockIdOffset<art::kRuntimePointerSize>().Int32Value()))) |
Igor Murashkin | 311fdf5 | 2016-07-22 15:59:16 -0700 | [diff] [blame] | 41 | #define THREAD_IS_GC_MARKING_OFFSET 52 |
Andreas Gampe | 542451c | 2016-07-26 09:02:02 -0700 | [diff] [blame] | 42 | DEFINE_CHECK_EQ(static_cast<int32_t>(THREAD_IS_GC_MARKING_OFFSET), (static_cast<int32_t>(art::Thread:: IsGcMarkingOffset<art::kRuntimePointerSize>().Int32Value()))) |
Igor Murashkin | 311fdf5 | 2016-07-22 15:59:16 -0700 | [diff] [blame] | 43 | #define THREAD_CARD_TABLE_OFFSET 128 |
Andreas Gampe | 542451c | 2016-07-26 09:02:02 -0700 | [diff] [blame] | 44 | DEFINE_CHECK_EQ(static_cast<int32_t>(THREAD_CARD_TABLE_OFFSET), (static_cast<int32_t>(art::Thread:: CardTableOffset<art::kRuntimePointerSize>().Int32Value()))) |
Igor Murashkin | 311fdf5 | 2016-07-22 15:59:16 -0700 | [diff] [blame] | 45 | #define CODEITEM_INSNS_OFFSET 16 |
| 46 | DEFINE_CHECK_EQ(static_cast<int32_t>(CODEITEM_INSNS_OFFSET), (static_cast<int32_t>(__builtin_offsetof(art::DexFile::CodeItem, insns_)))) |
| 47 | #define MIRROR_OBJECT_CLASS_OFFSET 0 |
| 48 | DEFINE_CHECK_EQ(static_cast<int32_t>(MIRROR_OBJECT_CLASS_OFFSET), (static_cast<int32_t>(art::mirror::Object:: ClassOffset().Int32Value()))) |
| 49 | #define MIRROR_OBJECT_LOCK_WORD_OFFSET 4 |
| 50 | DEFINE_CHECK_EQ(static_cast<int32_t>(MIRROR_OBJECT_LOCK_WORD_OFFSET), (static_cast<int32_t>(art::mirror::Object:: MonitorOffset().Int32Value()))) |
| 51 | #define MIRROR_CLASS_STATUS_INITIALIZED 0xa |
| 52 | DEFINE_CHECK_EQ(static_cast<uint32_t>(MIRROR_CLASS_STATUS_INITIALIZED), (static_cast<uint32_t>((art::mirror::Class::kStatusInitialized)))) |
| 53 | #define ACCESS_FLAGS_CLASS_IS_FINALIZABLE 0x80000000 |
| 54 | DEFINE_CHECK_EQ(static_cast<uint32_t>(ACCESS_FLAGS_CLASS_IS_FINALIZABLE), (static_cast<uint32_t>((art::kAccClassIsFinalizable)))) |
| 55 | #define ACCESS_FLAGS_CLASS_IS_FINALIZABLE_BIT 0x1f |
| 56 | DEFINE_CHECK_EQ(static_cast<uint32_t>(ACCESS_FLAGS_CLASS_IS_FINALIZABLE_BIT), (static_cast<uint32_t>((art::MostSignificantBit(art::kAccClassIsFinalizable))))) |
| 57 | #define ART_METHOD_DEX_CACHE_METHODS_OFFSET_32 20 |
Andreas Gampe | 542451c | 2016-07-26 09:02:02 -0700 | [diff] [blame] | 58 | DEFINE_CHECK_EQ(static_cast<int32_t>(ART_METHOD_DEX_CACHE_METHODS_OFFSET_32), (static_cast<int32_t>(art::ArtMethod:: DexCacheResolvedMethodsOffset(art::PointerSize::k32).Int32Value()))) |
Igor Murashkin | 311fdf5 | 2016-07-22 15:59:16 -0700 | [diff] [blame] | 59 | #define ART_METHOD_DEX_CACHE_METHODS_OFFSET_64 24 |
Andreas Gampe | 542451c | 2016-07-26 09:02:02 -0700 | [diff] [blame] | 60 | DEFINE_CHECK_EQ(static_cast<int32_t>(ART_METHOD_DEX_CACHE_METHODS_OFFSET_64), (static_cast<int32_t>(art::ArtMethod:: DexCacheResolvedMethodsOffset(art::PointerSize::k64).Int32Value()))) |
Igor Murashkin | 311fdf5 | 2016-07-22 15:59:16 -0700 | [diff] [blame] | 61 | #define ART_METHOD_DEX_CACHE_TYPES_OFFSET_32 24 |
Andreas Gampe | 542451c | 2016-07-26 09:02:02 -0700 | [diff] [blame] | 62 | DEFINE_CHECK_EQ(static_cast<int32_t>(ART_METHOD_DEX_CACHE_TYPES_OFFSET_32), (static_cast<int32_t>(art::ArtMethod:: DexCacheResolvedTypesOffset(art::PointerSize::k32).Int32Value()))) |
Igor Murashkin | 311fdf5 | 2016-07-22 15:59:16 -0700 | [diff] [blame] | 63 | #define ART_METHOD_DEX_CACHE_TYPES_OFFSET_64 32 |
Andreas Gampe | 542451c | 2016-07-26 09:02:02 -0700 | [diff] [blame] | 64 | DEFINE_CHECK_EQ(static_cast<int32_t>(ART_METHOD_DEX_CACHE_TYPES_OFFSET_64), (static_cast<int32_t>(art::ArtMethod:: DexCacheResolvedTypesOffset(art::PointerSize::k64).Int32Value()))) |
Igor Murashkin | 311fdf5 | 2016-07-22 15:59:16 -0700 | [diff] [blame] | 65 | #define ART_METHOD_JNI_OFFSET_32 28 |
Andreas Gampe | 542451c | 2016-07-26 09:02:02 -0700 | [diff] [blame] | 66 | DEFINE_CHECK_EQ(static_cast<int32_t>(ART_METHOD_JNI_OFFSET_32), (static_cast<int32_t>(art::ArtMethod:: EntryPointFromJniOffset(art::PointerSize::k32).Int32Value()))) |
Igor Murashkin | 311fdf5 | 2016-07-22 15:59:16 -0700 | [diff] [blame] | 67 | #define ART_METHOD_JNI_OFFSET_64 40 |
Andreas Gampe | 542451c | 2016-07-26 09:02:02 -0700 | [diff] [blame] | 68 | DEFINE_CHECK_EQ(static_cast<int32_t>(ART_METHOD_JNI_OFFSET_64), (static_cast<int32_t>(art::ArtMethod:: EntryPointFromJniOffset(art::PointerSize::k64).Int32Value()))) |
Igor Murashkin | 311fdf5 | 2016-07-22 15:59:16 -0700 | [diff] [blame] | 69 | #define ART_METHOD_QUICK_CODE_OFFSET_32 32 |
Andreas Gampe | 542451c | 2016-07-26 09:02:02 -0700 | [diff] [blame] | 70 | DEFINE_CHECK_EQ(static_cast<int32_t>(ART_METHOD_QUICK_CODE_OFFSET_32), (static_cast<int32_t>(art::ArtMethod:: EntryPointFromQuickCompiledCodeOffset(art::PointerSize::k32).Int32Value()))) |
Igor Murashkin | 311fdf5 | 2016-07-22 15:59:16 -0700 | [diff] [blame] | 71 | #define ART_METHOD_QUICK_CODE_OFFSET_64 48 |
Andreas Gampe | 542451c | 2016-07-26 09:02:02 -0700 | [diff] [blame] | 72 | DEFINE_CHECK_EQ(static_cast<int32_t>(ART_METHOD_QUICK_CODE_OFFSET_64), (static_cast<int32_t>(art::ArtMethod:: EntryPointFromQuickCompiledCodeOffset(art::PointerSize::k64).Int32Value()))) |
Mathieu Chartier | 8261d02 | 2016-08-08 09:41:04 -0700 | [diff] [blame] | 73 | #define MIN_LARGE_OBJECT_THRESHOLD 0x3000 |
| 74 | DEFINE_CHECK_EQ(static_cast<size_t>(MIN_LARGE_OBJECT_THRESHOLD), (static_cast<size_t>(art::gc::Heap::kMinLargeObjectThreshold))) |
Igor Murashkin | 311fdf5 | 2016-07-22 15:59:16 -0700 | [diff] [blame] | 75 | #define LOCK_WORD_STATE_SHIFT 30 |
| 76 | DEFINE_CHECK_EQ(static_cast<int32_t>(LOCK_WORD_STATE_SHIFT), (static_cast<int32_t>(art::LockWord::kStateShift))) |
| 77 | #define LOCK_WORD_STATE_MASK 0xc0000000 |
| 78 | DEFINE_CHECK_EQ(static_cast<uint32_t>(LOCK_WORD_STATE_MASK), (static_cast<uint32_t>(art::LockWord::kStateMaskShifted))) |
| 79 | #define LOCK_WORD_READ_BARRIER_STATE_SHIFT 28 |
| 80 | DEFINE_CHECK_EQ(static_cast<int32_t>(LOCK_WORD_READ_BARRIER_STATE_SHIFT), (static_cast<int32_t>(art::LockWord::kReadBarrierStateShift))) |
Mathieu Chartier | 36a270a | 2016-07-28 18:08:51 -0700 | [diff] [blame] | 81 | #define LOCK_WORD_READ_BARRIER_STATE_MASK 0x10000000 |
Igor Murashkin | 311fdf5 | 2016-07-22 15:59:16 -0700 | [diff] [blame] | 82 | DEFINE_CHECK_EQ(static_cast<uint32_t>(LOCK_WORD_READ_BARRIER_STATE_MASK), (static_cast<uint32_t>(art::LockWord::kReadBarrierStateMaskShifted))) |
Mathieu Chartier | 36a270a | 2016-07-28 18:08:51 -0700 | [diff] [blame] | 83 | #define LOCK_WORD_READ_BARRIER_STATE_MASK_TOGGLED 0xefffffff |
Igor Murashkin | 311fdf5 | 2016-07-22 15:59:16 -0700 | [diff] [blame] | 84 | DEFINE_CHECK_EQ(static_cast<uint32_t>(LOCK_WORD_READ_BARRIER_STATE_MASK_TOGGLED), (static_cast<uint32_t>(art::LockWord::kReadBarrierStateMaskShiftedToggled))) |
| 85 | #define LOCK_WORD_THIN_LOCK_COUNT_ONE 65536 |
| 86 | DEFINE_CHECK_EQ(static_cast<int32_t>(LOCK_WORD_THIN_LOCK_COUNT_ONE), (static_cast<int32_t>(art::LockWord::kThinLockCountOne))) |
Mathieu Chartier | 36a270a | 2016-07-28 18:08:51 -0700 | [diff] [blame] | 87 | #define LOCK_WORD_GC_STATE_MASK_SHIFTED 0x30000000 |
| 88 | DEFINE_CHECK_EQ(static_cast<uint32_t>(LOCK_WORD_GC_STATE_MASK_SHIFTED), (static_cast<uint32_t>(art::LockWord::kGCStateMaskShifted))) |
| 89 | #define LOCK_WORD_GC_STATE_MASK_SHIFTED_TOGGLED 0xcfffffff |
| 90 | DEFINE_CHECK_EQ(static_cast<uint32_t>(LOCK_WORD_GC_STATE_MASK_SHIFTED_TOGGLED), (static_cast<uint32_t>(art::LockWord::kGCStateMaskShiftedToggled))) |
| 91 | #define LOCK_WORD_GC_STATE_SHIFT 28 |
| 92 | DEFINE_CHECK_EQ(static_cast<int32_t>(LOCK_WORD_GC_STATE_SHIFT), (static_cast<int32_t>(art::LockWord::kGCStateShift))) |
| 93 | #define LOCK_WORD_MARK_BIT_SHIFT 29 |
| 94 | DEFINE_CHECK_EQ(static_cast<int32_t>(LOCK_WORD_MARK_BIT_SHIFT), (static_cast<int32_t>(art::LockWord::kMarkBitStateShift))) |
| 95 | #define LOCK_WORD_MARK_BIT_MASK_SHIFTED 0x20000000 |
| 96 | DEFINE_CHECK_EQ(static_cast<uint32_t>(LOCK_WORD_MARK_BIT_MASK_SHIFTED), (static_cast<uint32_t>(art::LockWord::kMarkBitStateMaskShifted))) |
Igor Murashkin | 311fdf5 | 2016-07-22 15:59:16 -0700 | [diff] [blame] | 97 | #define OBJECT_ALIGNMENT_MASK 0x7 |
| 98 | DEFINE_CHECK_EQ(static_cast<size_t>(OBJECT_ALIGNMENT_MASK), (static_cast<size_t>(art::kObjectAlignment - 1))) |
| 99 | #define OBJECT_ALIGNMENT_MASK_TOGGLED 0xfffffff8 |
| 100 | DEFINE_CHECK_EQ(static_cast<uint32_t>(OBJECT_ALIGNMENT_MASK_TOGGLED), (static_cast<uint32_t>(~static_cast<uint32_t>(art::kObjectAlignment - 1)))) |
| 101 | #define ROSALLOC_MAX_THREAD_LOCAL_BRACKET_SIZE 128 |
| 102 | DEFINE_CHECK_EQ(static_cast<int32_t>(ROSALLOC_MAX_THREAD_LOCAL_BRACKET_SIZE), (static_cast<int32_t>((art::gc::allocator::RosAlloc::kMaxThreadLocalBracketSize)))) |
| 103 | #define ROSALLOC_BRACKET_QUANTUM_SIZE_SHIFT 3 |
| 104 | DEFINE_CHECK_EQ(static_cast<int32_t>(ROSALLOC_BRACKET_QUANTUM_SIZE_SHIFT), (static_cast<int32_t>((art::gc::allocator::RosAlloc::kThreadLocalBracketQuantumSizeShift)))) |
| 105 | #define ROSALLOC_BRACKET_QUANTUM_SIZE_MASK 7 |
| 106 | DEFINE_CHECK_EQ(static_cast<int32_t>(ROSALLOC_BRACKET_QUANTUM_SIZE_MASK), (static_cast<int32_t>((static_cast<int32_t>(art::gc::allocator::RosAlloc::kThreadLocalBracketQuantumSize - 1))))) |
| 107 | #define ROSALLOC_BRACKET_QUANTUM_SIZE_MASK_TOGGLED32 0xfffffff8 |
| 108 | DEFINE_CHECK_EQ(static_cast<uint32_t>(ROSALLOC_BRACKET_QUANTUM_SIZE_MASK_TOGGLED32), (static_cast<uint32_t>((~static_cast<uint32_t>(art::gc::allocator::RosAlloc::kThreadLocalBracketQuantumSize - 1))))) |
| 109 | #define ROSALLOC_BRACKET_QUANTUM_SIZE_MASK_TOGGLED64 0xfffffffffffffff8 |
| 110 | DEFINE_CHECK_EQ(static_cast<uint64_t>(ROSALLOC_BRACKET_QUANTUM_SIZE_MASK_TOGGLED64), (static_cast<uint64_t>((~static_cast<uint64_t>(art::gc::allocator::RosAlloc::kThreadLocalBracketQuantumSize - 1))))) |
| 111 | #define ROSALLOC_RUN_FREE_LIST_OFFSET 8 |
| 112 | DEFINE_CHECK_EQ(static_cast<int32_t>(ROSALLOC_RUN_FREE_LIST_OFFSET), (static_cast<int32_t>((art::gc::allocator::RosAlloc::RunFreeListOffset())))) |
| 113 | #define ROSALLOC_RUN_FREE_LIST_HEAD_OFFSET 0 |
| 114 | DEFINE_CHECK_EQ(static_cast<int32_t>(ROSALLOC_RUN_FREE_LIST_HEAD_OFFSET), (static_cast<int32_t>((art::gc::allocator::RosAlloc::RunFreeListHeadOffset())))) |
| 115 | #define ROSALLOC_RUN_FREE_LIST_SIZE_OFFSET 16 |
| 116 | DEFINE_CHECK_EQ(static_cast<int32_t>(ROSALLOC_RUN_FREE_LIST_SIZE_OFFSET), (static_cast<int32_t>((art::gc::allocator::RosAlloc::RunFreeListSizeOffset())))) |
| 117 | #define ROSALLOC_SLOT_NEXT_OFFSET 0 |
| 118 | DEFINE_CHECK_EQ(static_cast<int32_t>(ROSALLOC_SLOT_NEXT_OFFSET), (static_cast<int32_t>((art::gc::allocator::RosAlloc::RunSlotNextOffset())))) |
| 119 | #define THREAD_SUSPEND_REQUEST 1 |
| 120 | DEFINE_CHECK_EQ(static_cast<int32_t>(THREAD_SUSPEND_REQUEST), (static_cast<int32_t>((art::kSuspendRequest)))) |
| 121 | #define THREAD_CHECKPOINT_REQUEST 2 |
| 122 | DEFINE_CHECK_EQ(static_cast<int32_t>(THREAD_CHECKPOINT_REQUEST), (static_cast<int32_t>((art::kCheckpointRequest)))) |
| 123 | #define JIT_CHECK_OSR (-1) |
| 124 | DEFINE_CHECK_EQ(static_cast<int16_t>(JIT_CHECK_OSR), (static_cast<int16_t>((art::jit::kJitCheckForOSR)))) |
| 125 | #define JIT_HOTNESS_DISABLE (-2) |
| 126 | DEFINE_CHECK_EQ(static_cast<int16_t>(JIT_HOTNESS_DISABLE), (static_cast<int16_t>((art::jit::kJitHotnessDisabled)))) |
| 127 | |
| 128 | #endif // ART_RUNTIME_GENERATED_ASM_SUPPORT_GEN_H_ |
| 129 | |