Mercurial > hg > graal-jvmci-8
comparison c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotXirGenerator.java @ 2060:40bcc41390e4
Added getClass intrinsic implementation.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Wed, 19 Jan 2011 16:13:13 +0100 |
parents | 9508a52cbd32 |
children | c0b1d6a44a02 |
comparison
equal
deleted
inserted
replaced
2059:9508a52cbd32 | 2060:40bcc41390e4 |
---|---|
731 } | 731 } |
732 return asm.finishTemplate("arrayload<" + kind + ">"); | 732 return asm.finishTemplate("arrayload<" + kind + ">"); |
733 } | 733 } |
734 }; | 734 }; |
735 | 735 |
736 private SimpleTemplates getClassTemplates = new SimpleTemplates() { | |
737 @Override | |
738 protected XirTemplate create(CiXirAssembler asm, long flags) { | |
739 XirOperand result = asm.restart(CiKind.Object); | |
740 XirOperand object = asm.createInputParameter("object", CiKind.Object); | |
741 asm.pload(CiKind.Object, result, object, asm.i(config.hubOffset), is(NULL_CHECK, flags)); | |
742 asm.pload(CiKind.Object, result, result, asm.i(config.classMirrorOffset), false); | |
743 return asm.finishTemplate("currentThread"); | |
744 } | |
745 }; | |
746 | |
736 private SimpleTemplates currentThreadTemplates = new SimpleTemplates() { | 747 private SimpleTemplates currentThreadTemplates = new SimpleTemplates() { |
737 @Override | 748 @Override |
738 protected XirTemplate create(CiXirAssembler asm, long flags) { | 749 protected XirTemplate create(CiXirAssembler asm, long flags) { |
739 XirOperand result = asm.restart(CiKind.Object); | 750 XirOperand result = asm.restart(CiKind.Object); |
740 XirOperand thread = asm.createRegisterTemp("thread", CiKind.Word, AMD64.r15); | 751 XirOperand thread = asm.createRegisterTemp("thread", CiKind.Word, AMD64.r15); |
744 }; | 755 }; |
745 | 756 |
746 @Override | 757 @Override |
747 public XirSnippet genCurrentThread(XirSite site) { | 758 public XirSnippet genCurrentThread(XirSite site) { |
748 return new XirSnippet(currentThreadTemplates.get(site)); | 759 return new XirSnippet(currentThreadTemplates.get(site)); |
760 } | |
761 | |
762 @Override | |
763 public XirSnippet genGetClass(XirSite site, XirArgument object) { | |
764 return new XirSnippet(getClassTemplates.get(site), object); | |
749 } | 765 } |
750 | 766 |
751 private KindTemplates arrayCopyTemplates = new KindTemplates() { | 767 private KindTemplates arrayCopyTemplates = new KindTemplates() { |
752 | 768 |
753 @Override | 769 @Override |