Allow more vregs in native GC map.
Allow upto 65536 (2**13 * 8) vregs in a reference bitmap as this occurs
in CTS tests. Achieve this by squeezing the numbers of bits used to say
how large in bytes the native PC offset is down to 3 from 8.
Change-Id: Ib0f1df7a492b771e01b0bd79d6648d46b60b5f78
diff --git a/src/gc_map.h b/src/gc_map.h
index 50e63d6..7becda5 100644
--- a/src/gc_map.h
+++ b/src/gc_map.h
@@ -70,7 +70,7 @@
// The number of bytes used to encode registers.
size_t RegWidth() const {
- return data_[1];
+ return ((size_t)data_[0] | ((size_t)data_[1] << 8)) >> 3;
}
private:
@@ -81,7 +81,7 @@
// Number of bytes used to encode a native offset.
size_t NativeOffsetWidth() const {
- return data_[0];
+ return data_[0] & 7;
}
// The width of an entry in the table.