Mercurial > hg > truffle
comparison 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 |
comparison
equal
deleted
inserted
replaced
21783:a858c5f56d8a | 21784:f4e1d958f1c3 |
---|---|
28 import static com.oracle.graal.hotspot.HotSpotBackend.*; | 28 import static com.oracle.graal.hotspot.HotSpotBackend.*; |
29 import static com.oracle.jvmci.amd64.AMD64.*; | 29 import static com.oracle.jvmci.amd64.AMD64.*; |
30 | 30 |
31 import java.util.*; | 31 import java.util.*; |
32 | 32 |
33 import com.oracle.graal.asm.amd64.AMD64Assembler.*; | 33 import com.oracle.graal.asm.amd64.AMD64Address.Scale; |
34 import com.oracle.graal.asm.amd64.AMD64Assembler.AMD64MIOp; | |
35 import com.oracle.graal.asm.amd64.AMD64Assembler.OperandSize; | |
34 import com.oracle.graal.compiler.amd64.*; | 36 import com.oracle.graal.compiler.amd64.*; |
35 import com.oracle.graal.compiler.common.*; | 37 import com.oracle.graal.compiler.common.*; |
36 import com.oracle.graal.compiler.common.spi.*; | 38 import com.oracle.graal.compiler.common.spi.*; |
37 import com.oracle.graal.hotspot.*; | 39 import com.oracle.graal.hotspot.*; |
38 import com.oracle.graal.hotspot.amd64.AMD64HotSpotMove.StoreRbpOp; | 40 import com.oracle.graal.hotspot.amd64.AMD64HotSpotMove.StoreRbpOp; |
582 public void emitNullCheck(Value address, LIRFrameState state) { | 584 public void emitNullCheck(Value address, LIRFrameState state) { |
583 if (address.getLIRKind().getPlatformKind() == Kind.Int) { | 585 if (address.getLIRKind().getPlatformKind() == Kind.Int) { |
584 CompressEncoding encoding = config.getOopEncoding(); | 586 CompressEncoding encoding = config.getOopEncoding(); |
585 Value uncompressed; | 587 Value uncompressed; |
586 if (encoding.shift <= 3) { | 588 if (encoding.shift <= 3) { |
587 uncompressed = emitAddress(getProviders().getRegisters().getHeapBaseRegister().asValue(), 0, load(address), 1 << encoding.shift); | 589 LIRKind wordKind = LIRKind.derivedReference(target().wordKind); |
590 uncompressed = new AMD64AddressValue(wordKind, getProviders().getRegisters().getHeapBaseRegister().asValue(wordKind), asAllocatable(address), Scale.fromInt(1 << encoding.shift), 0); | |
588 } else { | 591 } else { |
589 uncompressed = emitUncompress(address, encoding, false); | 592 uncompressed = emitUncompress(address, encoding, false); |
590 } | 593 } |
591 append(new AMD64Move.NullCheckOp(asAddressValue(uncompressed), state)); | 594 append(new AMD64Move.NullCheckOp(asAddressValue(uncompressed), state)); |
592 } else { | 595 } else { |
652 if (BenchmarkCounters.enabled) { | 655 if (BenchmarkCounters.enabled) { |
653 return new AMD64HotSpotCounterOp(names, groups, increments, getProviders().getRegisters(), config, getOrInitRescueSlot()); | 656 return new AMD64HotSpotCounterOp(names, groups, increments, getProviders().getRegisters(), config, getOrInitRescueSlot()); |
654 } | 657 } |
655 return null; | 658 return null; |
656 } | 659 } |
660 | |
661 @Override | |
662 public void emitPrefetchAllocate(Value address) { | |
663 append(new AMD64PrefetchOp(asAddressValue(address), config.allocatePrefetchInstr)); | |
664 } | |
665 | |
657 } | 666 } |