summaryrefslogtreecommitdiff
path: root/tools/cpp-define-generator
diff options
context:
space:
mode:
Diffstat (limited to 'tools/cpp-define-generator')
-rw-r--r--tools/cpp-define-generator/constant_dexcache.def6
-rw-r--r--tools/cpp-define-generator/constant_globals.def3
2 files changed, 8 insertions, 1 deletions
diff --git a/tools/cpp-define-generator/constant_dexcache.def b/tools/cpp-define-generator/constant_dexcache.def
index ede16d2108..743ebb7453 100644
--- a/tools/cpp-define-generator/constant_dexcache.def
+++ b/tools/cpp-define-generator/constant_dexcache.def
@@ -25,4 +25,8 @@ DEFINE_EXPR(STRING_DEX_CACHE_SIZE_MINUS_ONE, int32_t,
DEFINE_EXPR(STRING_DEX_CACHE_HASH_BITS, int32_t,
art::LeastSignificantBit(art::mirror::DexCache::kDexCacheStringCacheSize))
DEFINE_EXPR(STRING_DEX_CACHE_ELEMENT_SIZE, int32_t,
- sizeof(art::mirror::StringDexCachePair)) \ No newline at end of file
+ sizeof(art::mirror::StringDexCachePair))
+DEFINE_EXPR(METHOD_DEX_CACHE_SIZE_MINUS_ONE, int32_t,
+ art::mirror::DexCache::kDexCacheMethodCacheSize - 1)
+DEFINE_EXPR(METHOD_DEX_CACHE_HASH_BITS, int32_t,
+ art::LeastSignificantBit(art::mirror::DexCache::kDexCacheMethodCacheSize))
diff --git a/tools/cpp-define-generator/constant_globals.def b/tools/cpp-define-generator/constant_globals.def
index a3ccc72bb6..dbaf33cdef 100644
--- a/tools/cpp-define-generator/constant_globals.def
+++ b/tools/cpp-define-generator/constant_globals.def
@@ -17,9 +17,12 @@
// Export global values.
#if defined(DEFINE_INCLUDE_DEPENDENCIES)
+#include <atomic> // std::memory_order_relaxed
#include "globals.h" // art::kObjectAlignment
#endif
+DEFINE_EXPR(STD_MEMORY_ORDER_RELAXED, int32_t, std::memory_order_relaxed)
+
#define DEFINE_OBJECT_EXPR(macro_name, type, constant_field_name) \
DEFINE_EXPR(OBJECT_ ## macro_name, type, constant_field_name)