summaryrefslogtreecommitdiffstats
path: root/compiler/dex/compiler_enums.h
diff options
context:
space:
mode:
authorbuzbee <buzbee@google.com>2014-06-01 09:33:49 -0700
committerbuzbee <buzbee@google.com>2014-06-03 11:21:15 -0700
commita0cd2d701f29e0bc6275f1b13c0edfd4ec391879 (patch)
tree89d1632aa9b78a60adcdafc096bd1fea28fe3c16 /compiler/dex/compiler_enums.h
parente4283be97047a26d3476acd3863dcc386498be17 (diff)
downloadart-a0cd2d701f29e0bc6275f1b13c0edfd4ec391879.tar.gz
art-a0cd2d701f29e0bc6275f1b13c0edfd4ec391879.tar.bz2
art-a0cd2d701f29e0bc6275f1b13c0edfd4ec391879.zip
Quick compiler: reference cleanup
For 32-bit targets, object references are 32 bits wide both in Dalvik virtual registers and in core physical registers. Because of this, object references and non-floating point values were both handled as if they had the same register class (kCoreReg). However, for 64-bit systems, references are 32 bits in Dalvik vregs, but 64 bits in physical registers. Although the same underlying physical core registers will still be used for object reference and non-float values, different register class views will be used to represent them. For example, an object reference in arm64 might be held in x3 at some point, while the same underlying physical register, w3, would be used to hold a 32-bit int. This CL breaks apart the handling of object reference and non-float values to allow the proper register class (or register view) to be used. A new register class, kRefReg, is introduced which will map to a 32-bit core register on 32-bit targets, and 64-bit core registers on 64-bit targets. From this point on, object references should be allocated registers in the kRefReg class rather than kCoreReg. Change-Id: I6166827daa8a0ea3af326940d56a6a14874f5810
Diffstat (limited to 'compiler/dex/compiler_enums.h')
-rw-r--r--compiler/dex/compiler_enums.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/dex/compiler_enums.h b/compiler/dex/compiler_enums.h
index 767ffbf432..eb48cc3783 100644
--- a/compiler/dex/compiler_enums.h
+++ b/compiler/dex/compiler_enums.h
@@ -25,6 +25,7 @@ enum RegisterClass {
kInvalidRegClass,
kCoreReg,
kFPReg,
+ kRefReg,
kAnyReg,
};