Mercurial > hg > truffle
changeset 18706:b6e98df9ba7d
HotSpotReferenceMap: fix bitmap clearing in setOop()/clearOop() and setNarrowOop()/clearNarrowOop().
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Tue, 16 Dec 2014 21:02:12 +0100 |
parents | 5dcb9fdea75a |
children | 3d4e1284d39e |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotReferenceMap.java |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotReferenceMap.java Wed Dec 17 08:04:57 2014 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotReferenceMap.java Tue Dec 16 21:02:12 2014 +0100 @@ -94,7 +94,7 @@ private static void setOop(BitSet map, int startIdx, LIRKind kind) { int length = kind.getPlatformKind().getVectorLength(); - map.clear(BITS_PER_WORD * startIdx, BITS_PER_WORD * (startIdx + length) - 1); + map.clear(BITS_PER_WORD * startIdx, BITS_PER_WORD * (startIdx + length)); for (int i = 0, idx = BITS_PER_WORD * startIdx; i < length; i++, idx += BITS_PER_WORD) { if (kind.isReference(i)) { map.set(idx); @@ -105,7 +105,7 @@ private static void setNarrowOop(BitSet map, int idx, LIRKind kind) { int length = kind.getPlatformKind().getVectorLength(); int nextIdx = idx + (length + 1) / 2; - map.clear(BITS_PER_WORD * idx, BITS_PER_WORD * nextIdx - 1); + map.clear(BITS_PER_WORD * idx, BITS_PER_WORD * nextIdx); for (int i = 0, regIdx = BITS_PER_WORD * idx; i < length; i += 2, regIdx += BITS_PER_WORD) { if (kind.isReference(i)) { map.set(regIdx); @@ -179,13 +179,13 @@ private static void clearOop(BitSet map, int startIdx, LIRKind kind) { int length = kind.getPlatformKind().getVectorLength(); - map.clear(BITS_PER_WORD * startIdx, BITS_PER_WORD * (startIdx + length) - 1); + map.clear(BITS_PER_WORD * startIdx, BITS_PER_WORD * (startIdx + length)); } private static void clearNarrowOop(BitSet map, int idx, LIRKind kind) { int length = kind.getPlatformKind().getVectorLength(); int nextIdx = idx + (length + 1) / 2; - map.clear(BITS_PER_WORD * idx, BITS_PER_WORD * nextIdx - 1); + map.clear(BITS_PER_WORD * idx, BITS_PER_WORD * nextIdx); } public void clearRegister(int idx, LIRKind kind) {