summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/generated/asm_support_gen.h2
-rw-r--r--tools/cpp-define-generator/constant_dexcache.def10
2 files changed, 9 insertions, 3 deletions
diff --git a/runtime/generated/asm_support_gen.h b/runtime/generated/asm_support_gen.h
index 40b71c40a4..5c98ea6114 100644
--- a/runtime/generated/asm_support_gen.h
+++ b/runtime/generated/asm_support_gen.h
@@ -80,6 +80,8 @@ DEFINE_CHECK_EQ(static_cast<int32_t>(STRING_DEX_CACHE_ELEMENT_SIZE_SHIFT), (stat
DEFINE_CHECK_EQ(static_cast<int32_t>(STRING_DEX_CACHE_SIZE_MINUS_ONE), (static_cast<int32_t>(art::mirror::DexCache::kDexCacheStringCacheSize - 1)))
#define STRING_DEX_CACHE_HASH_BITS 10
DEFINE_CHECK_EQ(static_cast<int32_t>(STRING_DEX_CACHE_HASH_BITS), (static_cast<int32_t>(art::LeastSignificantBit(art::mirror::DexCache::kDexCacheStringCacheSize))))
+#define STRING_DEX_CACHE_ELEMENT_SIZE 0x8
+DEFINE_CHECK_EQ(static_cast<size_t>(STRING_DEX_CACHE_ELEMENT_SIZE), (static_cast<size_t>(sizeof(art::mirror::StringDexCachePair))))
#define MIN_LARGE_OBJECT_THRESHOLD 0x3000
DEFINE_CHECK_EQ(static_cast<size_t>(MIN_LARGE_OBJECT_THRESHOLD), (static_cast<size_t>(art::gc::Heap::kMinLargeObjectThreshold)))
#define LOCK_WORD_STATE_SHIFT 30
diff --git a/tools/cpp-define-generator/constant_dexcache.def b/tools/cpp-define-generator/constant_dexcache.def
index fd197f2b33..d10ca1eed2 100644
--- a/tools/cpp-define-generator/constant_dexcache.def
+++ b/tools/cpp-define-generator/constant_dexcache.def
@@ -18,7 +18,11 @@
#include "mirror/dex_cache.h" // art::mirror::DexCache, StringDexCachePair
#endif
-DEFINE_EXPR(STRING_DEX_CACHE_ELEMENT_SIZE_SHIFT, int32_t, art::WhichPowerOf2(sizeof(art::mirror::StringDexCachePair)))
-DEFINE_EXPR(STRING_DEX_CACHE_SIZE_MINUS_ONE, int32_t, art::mirror::DexCache::kDexCacheStringCacheSize - 1)
+DEFINE_EXPR(STRING_DEX_CACHE_ELEMENT_SIZE_SHIFT, int32_t,
+ art::WhichPowerOf2(sizeof(art::mirror::StringDexCachePair)))
+DEFINE_EXPR(STRING_DEX_CACHE_SIZE_MINUS_ONE, int32_t,
+ art::mirror::DexCache::kDexCacheStringCacheSize - 1)
DEFINE_EXPR(STRING_DEX_CACHE_HASH_BITS, int32_t,
- art::LeastSignificantBit(art::mirror::DexCache::kDexCacheStringCacheSize)) \ No newline at end of file
+ art::LeastSignificantBit(art::mirror::DexCache::kDexCacheStringCacheSize))
+DEFINE_EXPR(STRING_DEX_CACHE_ELEMENT_SIZE, size_t,
+ sizeof(art::mirror::StringDexCachePair)) \ No newline at end of file