summaryrefslogtreecommitdiffstats
path: root/runtime/vmap_table.h
diff options
context:
space:
mode:
authorbuzbee <buzbee@google.com>2014-06-21 15:31:01 -0700
committerAndreas Gampe <agampe@google.com>2014-07-03 00:12:07 -0700
commitb5860fb459f1ed71f39d8a87b45bee6727d79fe8 (patch)
tree3ac54afcb83678d3edfef855f62b79de8b3fff85 /runtime/vmap_table.h
parent555377d55c37db860583e0655f63a1dacb589921 (diff)
downloadandroid_art-b5860fb459f1ed71f39d8a87b45bee6727d79fe8.tar.gz
android_art-b5860fb459f1ed71f39d8a87b45bee6727d79fe8.tar.bz2
android_art-b5860fb459f1ed71f39d8a87b45bee6727d79fe8.zip
Register promotion support for 64-bit targets
Not sufficiently tested for 64-bit targets, but should be fairly close. A significant amount of refactoring could stil be done, (in later CLs). With this change we are not making any changes to the vmap scheme. As a result, it is a requirement that if a vreg is promoted to both a 32-bit view and the low half of a 64-bit view it must share the same physical register. We may change this restriction later on to allow for more flexibility for 32-bit Arm. For example, if v4, v5, v4/v5 and v5/v6 are all hot enough to promote, we'd end up with something like: v4 (as an int) -> r10 v4/v5 (as a long) -> r10 v5 (as an int) -> r11 v5/v6 (as a long) -> r11 Fix a couple of ARM64 bugs on the way... Change-Id: I6a152b9c164d9f1a053622266e165428045362f3
Diffstat (limited to 'runtime/vmap_table.h')
-rw-r--r--runtime/vmap_table.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/vmap_table.h b/runtime/vmap_table.h
index 98217535ee..df5cd80e97 100644
--- a/runtime/vmap_table.h
+++ b/runtime/vmap_table.h
@@ -64,6 +64,12 @@ class VmapTable {
const uint8_t* table = table_;
uint16_t adjusted_vreg = vreg + kEntryAdjustment;
size_t end = DecodeUnsignedLeb128(&table);
+ bool high_reg = (kind == kLongHiVReg) || (kind == kDoubleHiVReg);
+ bool target64 = (kRuntimeISA == kArm64) || (kRuntimeISA == kX86_64);
+ if (target64 && high_reg) {
+ // Wide promoted registers are associated with the sreg of the low portion.
+ adjusted_vreg--;
+ }
for (size_t i = 0; i < end; ++i) {
// Stop if we find what we are are looking for.
uint16_t adjusted_entry = DecodeUnsignedLeb128(&table);