Mercurial > hg > truffle
comparison graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java @ 15910:79a0d9065849
Support direct comparison of compressed pointers.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Mon, 26 May 2014 16:13:58 +0200 |
parents | e43591136d9f |
children | af0e42dad358 |
comparison
equal
deleted
inserted
replaced
15909:e43591136d9f | 15910:79a0d9065849 |
---|---|
641 assert address.getKind() == Kind.Object : address + " - " + address.getKind() + " not an object!"; | 641 assert address.getKind() == Kind.Object : address + " - " + address.getKind() + " not an object!"; |
642 append(new AMD64Move.NullCheckOp(load(address), state)); | 642 append(new AMD64Move.NullCheckOp(load(address), state)); |
643 } | 643 } |
644 | 644 |
645 @Override | 645 @Override |
646 protected void emitCompareOp(PlatformKind cmpKind, Variable left, Value right) { | |
647 if (right instanceof HotSpotConstant) { | |
648 append(new AMD64HotSpotCompare.HotSpotCompareConstantOp(left, (Constant) right)); | |
649 } else if (cmpKind == NarrowOopStamp.NarrowOop) { | |
650 append(new AMD64HotSpotCompare.HotSpotCompareNarrowOp(left, asAllocatable(right))); | |
651 } else { | |
652 super.emitCompareOp(cmpKind, left, right); | |
653 } | |
654 } | |
655 | |
656 @Override | |
657 protected void emitCompareMemoryConOp(Kind kind, AMD64AddressValue address, Constant value, LIRFrameState state) { | |
658 if (value instanceof HotSpotConstant) { | |
659 append(new AMD64HotSpotCompare.HotSpotCompareMemoryConstantOp(kind, address, value, state)); | |
660 } else { | |
661 super.emitCompareMemoryConOp(kind, address, value, state); | |
662 } | |
663 } | |
664 | |
665 @Override | |
646 public boolean canInlineConstant(Constant c) { | 666 public boolean canInlineConstant(Constant c) { |
647 if (HotSpotCompressedNullConstant.COMPRESSED_NULL.equals(c)) { | 667 if (HotSpotCompressedNullConstant.COMPRESSED_NULL.equals(c)) { |
648 return true; | 668 return true; |
649 } else if (c instanceof HotSpotObjectConstant) { | 669 } else if (c instanceof HotSpotObjectConstant) { |
650 return HotSpotObjectConstant.isCompressed(c); | 670 return HotSpotObjectConstant.isCompressed(c); |