Mercurial > hg > truffle
diff graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java @ 21784:f4e1d958f1c3
[AMD64] Create AMD64 specific address nodes.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Mon, 08 Jun 2015 19:19:45 +0200 |
parents | 0df7d7d6c25b |
children |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java Mon Jun 08 18:47:58 2015 +0200 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java Mon Jun 08 19:19:45 2015 +0200 @@ -30,7 +30,9 @@ import java.util.*; -import com.oracle.graal.asm.amd64.AMD64Assembler.*; +import com.oracle.graal.asm.amd64.AMD64Address.Scale; +import com.oracle.graal.asm.amd64.AMD64Assembler.AMD64MIOp; +import com.oracle.graal.asm.amd64.AMD64Assembler.OperandSize; import com.oracle.graal.compiler.amd64.*; import com.oracle.graal.compiler.common.*; import com.oracle.graal.compiler.common.spi.*; @@ -584,7 +586,8 @@ CompressEncoding encoding = config.getOopEncoding(); Value uncompressed; if (encoding.shift <= 3) { - uncompressed = emitAddress(getProviders().getRegisters().getHeapBaseRegister().asValue(), 0, load(address), 1 << encoding.shift); + LIRKind wordKind = LIRKind.derivedReference(target().wordKind); + uncompressed = new AMD64AddressValue(wordKind, getProviders().getRegisters().getHeapBaseRegister().asValue(wordKind), asAllocatable(address), Scale.fromInt(1 << encoding.shift), 0); } else { uncompressed = emitUncompress(address, encoding, false); } @@ -654,4 +657,10 @@ } return null; } + + @Override + public void emitPrefetchAllocate(Value address) { + append(new AMD64PrefetchOp(asAddressValue(address), config.allocatePrefetchInstr)); + } + }