summaryrefslogtreecommitdiffstats
path: root/runtime/globals.h
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-04-03 13:31:32 -0700
committerAndreas Gampe <agampe@google.com>2014-04-03 13:31:32 -0700
commit242947dbcdc4038ddd8ac522bb480f82e7d92ffa (patch)
treea84dc663494a1dbadd0f209788ae071742381309 /runtime/globals.h
parent0537c5ea92a4fb60a04024cc2b7247f08a3d9096 (diff)
downloadart-242947dbcdc4038ddd8ac522bb480f82e7d92ffa.zip
art-242947dbcdc4038ddd8ac522bb480f82e7d92ffa.tar.gz
art-242947dbcdc4038ddd8ac522bb480f82e7d92ffa.tar.bz2
Make frame size dependent on arch-specific constants.
Necessary for proper cross-compiling. Change-Id: I852901ee6ca5121e480b83a8e318bdc9c7d615e8
Diffstat (limited to 'runtime/globals.h')
-rw-r--r--runtime/globals.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/globals.h b/runtime/globals.h
index f2d6862..ee8dc07 100644
--- a/runtime/globals.h
+++ b/runtime/globals.h
@@ -31,9 +31,17 @@ static constexpr size_t KB = 1024;
static constexpr size_t MB = KB * KB;
static constexpr size_t GB = KB * KB * KB;
+// Runtime sizes.
static constexpr size_t kWordSize = sizeof(word);
static constexpr size_t kPointerSize = sizeof(void*);
+// Architecture-specific pointer sizes
+static constexpr size_t kArmPointerSize = 4;
+static constexpr size_t kArm64PointerSize = 8;
+static constexpr size_t kMipsPointerSize = 4;
+static constexpr size_t kX86PointerSize = 4;
+static constexpr size_t kX86_64PointerSize = 8;
+
static constexpr size_t kBitsPerByte = 8;
static constexpr size_t kBitsPerByteLog2 = 3;
static constexpr int kBitsPerWord = kWordSize * kBitsPerByte;