From a0cd2d701f29e0bc6275f1b13c0edfd4ec391879 Mon Sep 17 00:00:00 2001 From: buzbee Date: Sun, 1 Jun 2014 09:33:49 -0700 Subject: 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 --- compiler/dex/compiler_enums.h | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/dex/compiler_enums.h') 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, }; -- cgit v1.2.3-59-g8ed1b