Index: /export/ichebyki/workspace-e3.2.1/Harmony/working_vm/vm/jitrino/src/codegenerator/ipf/IpfEncoder.cpp =================================================================== --- /export/ichebyki/workspace-e3.2.1/Harmony/working_vm/vm/jitrino/src/codegenerator/ipf/IpfEncoder.cpp (revision 489039) +++ /export/ichebyki/workspace-e3.2.1/Harmony/working_vm/vm/jitrino/src/codegenerator/ipf/IpfEncoder.cpp (working copy) @@ -562,7 +562,7 @@ } else { IPF_ERR << __FILE__ << ": " << __LINE__ << ": NOT YET IMPLEMENTED INSTRUCTION: " - << Encoder::getMnemonic(INST_MOV) << "\n"; + << IrPrinter::toString(inst) << "\n"; assert(0); } } else { @@ -568,7 +568,7 @@ } else { IPF_ERR << __FILE__ << ": " << __LINE__ << ": NOT YET IMPLEMENTED INSTRUCTION: " - << Encoder::getMnemonic(INST_MOV) << "\n"; + << IrPrinter::toString(inst) << "\n"; assert(0); } break; Index: /export/ichebyki/workspace-e3.2.1/Harmony/working_vm/vm/jitrino/src/codegenerator/ipf/IpfInstCodeSelector.cpp =================================================================== --- /export/ichebyki/workspace-e3.2.1/Harmony/working_vm/vm/jitrino/src/codegenerator/ipf/IpfInstCodeSelector.cpp (revision 489039) +++ /export/ichebyki/workspace-e3.2.1/Harmony/working_vm/vm/jitrino/src/codegenerator/ipf/IpfInstCodeSelector.cpp (working copy) @@ -1842,8 +1842,7 @@ CG_OpndHandle *IpfInstCodeSelector::tau_ldIntfTableAddr(Type *dstType, CG_OpndHandle *base, - NamedType *vtableType, - CG_OpndHandle *) { + NamedType *vtableType) { IPF_LOG << " tau_ldIntfTableAddr; dstType==" << Type::tag2str(dstType->tag) << "; vtableType=" << Type::tag2str(vtableType->tag) << endl; @@ -2958,6 +2957,47 @@ } //----------------------------------------------------------------------------// + +CG_OpndHandle *IpfInstCodeSelector::ldRef(Type *dstType, + MethodDesc* enclosingMethod, + uint32 refToken, + bool uncompress) +{ + assert(dstType->isSystemString() || dstType->isSystemClass()); + + RegOpnd *retOpnd = opndManager->newRegOpnd(OPND_G_REG, toDataKind(dstType->tag)); + Opnd *helperArgs[] = { + opndManager->newImm(refToken), + opndManager->newImm((int64) enclosingMethod->getParentType()->getRuntimeIdentifier()) + }; + CompilationInterface::RuntimeHelperId hId = CompilationInterface::Helper_LdRef; + uint64 address = (uint64) compilationInterface.getRuntimeHelperAddress(hId); + Opnd *helperAddress = opndManager->newImm(address); + + directCall(2, helperArgs, retOpnd, helperAddress, p0); + + return retOpnd; +} + +//----------------------------------------------------------------------------// + +void IpfInstCodeSelector::methodEntry(MethodDesc *meth) { + + if (compilationInterface.getCompilationParams().exe_notify_method_entry) { + NOT_IMPLEMENTED_V("methodEntry"); + } + +} + +void IpfInstCodeSelector::methodEnd(MethodDesc *meth, CG_OpndHandle *retopnd) { + + if (compilationInterface.getCompilationParams().exe_notify_method_exit) { + NOT_IMPLEMENTED_V("methodEnd"); + } + +} + +//----------------------------------------------------------------------------// // Divide two float values. void IpfInstCodeSelector::divFloat(RegOpnd *dst, CG_OpndHandle *src1, CG_OpndHandle *src2, bool rem) { @@ -3136,6 +3176,7 @@ case Type::Array : return DATA_BASE; case Type::Object : return DATA_BASE; case Type::NullObject : return DATA_BASE; + case Type::SystemClass : return DATA_BASE; case Type::SystemObject : return DATA_BASE; case Type::SystemString : return DATA_BASE; case Type::ManagedPtr : return DATA_MPTR; @@ -3158,6 +3199,7 @@ case Type::Object : return OPND_G_REG; case Type::NullObject : return OPND_G_REG; case Type::SystemObject : return OPND_G_REG; + case Type::SystemClass : return OPND_G_REG; case Type::Boolean : return OPND_G_REG; case Type::Char : return OPND_G_REG; case Type::Int8 : return OPND_G_REG; Index: /export/ichebyki/workspace-e3.2.1/Harmony/working_vm/vm/jitrino/src/codegenerator/ipf/include/IpfCodeSelector.h =================================================================== --- /export/ichebyki/workspace-e3.2.1/Harmony/working_vm/vm/jitrino/src/codegenerator/ipf/include/IpfCodeSelector.h (revision 489039) +++ /export/ichebyki/workspace-e3.2.1/Harmony/working_vm/vm/jitrino/src/codegenerator/ipf/include/IpfCodeSelector.h (working copy) @@ -207,7 +207,6 @@ CG_OpndHandle *tau_ldVirtFunAddr(Type*, CG_OpndHandle*, MethodDesc*, CG_OpndHandle*); CG_OpndHandle *tau_ldVTableAddr(Type*, CG_OpndHandle*, CG_OpndHandle*); CG_OpndHandle *getVTableAddr(Type*, ObjectType*); - CG_OpndHandle *tau_ldIntfTableAddr(Type*, CG_OpndHandle*, NamedType*, CG_OpndHandle*); CG_OpndHandle *ldFieldAddr(Type*, CG_OpndHandle*, FieldDesc*); CG_OpndHandle *ldStaticAddr(Type*, FieldDesc*); @@ -308,14 +307,15 @@ CG_OpndHandle* convUPtrToObject(ObjectType*, CG_OpndHandle*) { NOT_IMPLEMENTED_C("convUPtrToObject") } CG_OpndHandle* convToUPtr(PtrType*, CG_OpndHandle*) { NOT_IMPLEMENTED_C("convToUPtr") } - CG_OpndHandle* tau_ldIntfTableAddr(Type*, CG_OpndHandle*, NamedType*) { NOT_IMPLEMENTED_C("tau_ldIntfTableAddr") } + CG_OpndHandle *tau_ldIntfTableAddr(Type*, CG_OpndHandle*, NamedType*, CG_OpndHandle*) { NOT_IMPLEMENTED_C("tau_ldIntfTableAddr"); } + CG_OpndHandle* tau_ldIntfTableAddr(Type*, CG_OpndHandle*, NamedType*); CG_OpndHandle* arraycopyReverse(unsigned int, CG_OpndHandle**) { NOT_IMPLEMENTED_C("arraycopyReverse") } CG_OpndHandle* arraycopy(unsigned int, CG_OpndHandle**) { NOT_IMPLEMENTED_C("arraycopy") } CG_OpndHandle* addElemIndexWithLEA(Type*, CG_OpndHandle*, CG_OpndHandle*) { NOT_IMPLEMENTED_C("addElemIndexWithLEA") } - CG_OpndHandle* ldRef(Type*, MethodDesc*, unsigned int, bool) { NOT_IMPLEMENTED_C("ldRef") } + CG_OpndHandle* ldRef(Type*, MethodDesc*, unsigned int, bool); void pseudoInst() { NOT_IMPLEMENTED_V("pseudoInst") } - void methodEntry(MethodDesc*) { NOT_IMPLEMENTED_V("methodEntry") } - void methodEnd(MethodDesc*, CG_OpndHandle*) { NOT_IMPLEMENTED_V("methodEnd") } + void methodEntry(MethodDesc*); + void methodEnd(MethodDesc*, CG_OpndHandle*); void tau_stRef(CG_OpndHandle*, CG_OpndHandle*, CG_OpndHandle*, Type::Tag, bool, CG_OpndHandle*, CG_OpndHandle*, CG_OpndHandle*) { NOT_IMPLEMENTED_V("tau_stRef") } //---------------------------------------------------------------------------//