Mercurial > hg > truffle
changeset 12670:cf57663a2a36
use getAddress instead of getLong in HotSpotGraalRuntime
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 05 Nov 2013 06:50:16 +0100 |
parents | 1152cf83f0b9 |
children | 582b3d24c6ad |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalRuntime.java |
diffstat | 1 files changed, 2 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalRuntime.java Tue Nov 05 06:49:29 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalRuntime.java Tue Nov 05 06:50:16 2013 +0100 @@ -157,10 +157,7 @@ * Reads a word value from a given address. */ public static long unsafeReadWord(long address) { - if (getHostWordKind() == Kind.Long) { - return unsafe.getLong(address); - } - return unsafe.getInt(address); + return unsafe.getAddress(address); } /** @@ -177,7 +174,7 @@ if (getHostWordKind() == Kind.Long) { return unsafe.getLong(object, offset); } - return unsafe.getInt(object, offset); + return unsafe.getInt(object, offset) & 0xFFFFFFFFL; } protected/* final */CompilerToVM compilerToVm;