src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRGenerator.java
equal
deleted
inserted
replaced
570 LIRKindTool lirKindTool = getLIRKindTool(); |
570 LIRKindTool lirKindTool = getLIRKindTool(); |
571 assert inputKind.getPlatformKind() == lirKindTool.getObjectKind().getPlatformKind(); |
571 assert inputKind.getPlatformKind() == lirKindTool.getObjectKind().getPlatformKind(); |
572 if (inputKind.isReference(0)) { |
572 if (inputKind.isReference(0)) { |
573 // oop |
573 // oop |
574 Variable result = newVariable(lirKindTool.getNarrowOopKind()); |
574 Variable result = newVariable(lirKindTool.getNarrowOopKind()); |
575 append(new AMD64Move.CompressPointer(result, asAllocatable(pointer), getProviders().getRegisters().getHeapBaseRegister().asValue(), encoding, nonNull, getLIRKindTool())); |
575 append(new AMD64Move.CompressPointerOp(result, asAllocatable(pointer), getProviders().getRegisters().getHeapBaseRegister().asValue(), encoding, nonNull, getLIRKindTool())); |
576 return result; |
576 return result; |
577 } else { |
577 } else { |
578 // metaspace pointer |
578 // metaspace pointer |
579 Variable result = newVariable(lirKindTool.getNarrowPointerKind()); |
579 Variable result = newVariable(lirKindTool.getNarrowPointerKind()); |
580 AllocatableValue base = Value.ILLEGAL; |
580 AllocatableValue base = Value.ILLEGAL; |
587 base = baseAddress; |
587 base = baseAddress; |
588 } else { |
588 } else { |
589 base = emitLoadConstant(lirKindTool.getWordKind(), JavaConstant.forLong(encoding.getBase())); |
589 base = emitLoadConstant(lirKindTool.getWordKind(), JavaConstant.forLong(encoding.getBase())); |
590 } |
590 } |
591 } |
591 } |
592 append(new AMD64Move.CompressPointer(result, asAllocatable(pointer), base, encoding, nonNull, getLIRKindTool())); |
592 append(new AMD64Move.CompressPointerOp(result, asAllocatable(pointer), base, encoding, nonNull, getLIRKindTool())); |
593 return result; |
593 return result; |
594 } |
594 } |
595 } |
595 } |
596 |
596 |
597 @Override |
597 @Override |
600 LIRKindTool lirKindTool = getLIRKindTool(); |
600 LIRKindTool lirKindTool = getLIRKindTool(); |
601 assert inputKind.getPlatformKind() == lirKindTool.getNarrowOopKind().getPlatformKind(); |
601 assert inputKind.getPlatformKind() == lirKindTool.getNarrowOopKind().getPlatformKind(); |
602 if (inputKind.isReference(0)) { |
602 if (inputKind.isReference(0)) { |
603 // oop |
603 // oop |
604 Variable result = newVariable(lirKindTool.getObjectKind()); |
604 Variable result = newVariable(lirKindTool.getObjectKind()); |
605 append(new AMD64Move.UncompressPointer(result, asAllocatable(pointer), getProviders().getRegisters().getHeapBaseRegister().asValue(), encoding, nonNull, lirKindTool)); |
605 append(new AMD64Move.UncompressPointerOp(result, asAllocatable(pointer), getProviders().getRegisters().getHeapBaseRegister().asValue(), encoding, nonNull, lirKindTool)); |
606 return result; |
606 return result; |
607 } else { |
607 } else { |
608 // metaspace pointer |
608 // metaspace pointer |
609 LIRKind uncompressedKind = lirKindTool.getWordKind(); |
609 LIRKind uncompressedKind = lirKindTool.getWordKind(); |
610 Variable result = newVariable(uncompressedKind); |
610 Variable result = newVariable(uncompressedKind); |
618 base = baseAddress; |
618 base = baseAddress; |
619 } else { |
619 } else { |
620 base = emitLoadConstant(uncompressedKind, JavaConstant.forLong(encoding.getBase())); |
620 base = emitLoadConstant(uncompressedKind, JavaConstant.forLong(encoding.getBase())); |
621 } |
621 } |
622 } |
622 } |
623 append(new AMD64Move.UncompressPointer(result, asAllocatable(pointer), base, encoding, nonNull, lirKindTool)); |
623 append(new AMD64Move.UncompressPointerOp(result, asAllocatable(pointer), base, encoding, nonNull, lirKindTool)); |
624 return result; |
624 return result; |
625 } |
625 } |
626 } |
626 } |
627 |
627 |
628 @Override |
628 @Override |