diff --git a/src/inc/clrconfigvalues.h b/src/inc/clrconfigvalues.h index 78a7719600a2..a0183d2b51bd 100644 --- a/src/inc/clrconfigvalues.h +++ b/src/inc/clrconfigvalues.h @@ -606,11 +606,11 @@ RETAIL_CONFIG_DWORD_INFO(INTERNAL_InterpreterDoLoopMethods, W("InterpreterDoLoop RETAIL_CONFIG_DWORD_INFO_EX(INTERNAL_InterpreterUseCaching, W("InterpreterUseCaching"), 1, "If non-zero, use the caching mechanism.", CLRConfig::REGUTIL_default) RETAIL_CONFIG_DWORD_INFO_EX(INTERNAL_InterpreterLooseRules, W("InterpreterLooseRules"), 1, "If non-zero, allow ECMA spec violations required by managed C++.", CLRConfig::REGUTIL_default) RETAIL_CONFIG_DWORD_INFO(INTERNAL_InterpreterPrintPostMortem, W("InterpreterPrintPostMortem"), 0, "Prints summary information about the execution to the console") -CONFIG_STRING_INFO_EX(INTERNAL_InterpreterLogFile, W("InterpreterLogFile"), "If non-null, append interpreter logging to this file, else use stdout", CLRConfig::REGUTIL_default) -CONFIG_DWORD_INFO(INTERNAL_DumpInterpreterStubs, W("DumpInterpreterStubs"), 0, "Prints all interpreter stubs that are created to the console") -CONFIG_DWORD_INFO(INTERNAL_TraceInterpreterEntries, W("TraceInterpreterEntries"), 0, "Logs entries to interpreted methods to the console") -CONFIG_DWORD_INFO(INTERNAL_TraceInterpreterIL, W("TraceInterpreterIL"), 0, "Logs individual instructions of interpreted methods to the console") -CONFIG_DWORD_INFO(INTERNAL_TraceInterpreterOstack, W("TraceInterpreterOstack"), 0, "Logs operand stack after each IL instruction of interpreted methods to the console") +RETAIL_CONFIG_STRING_INFO_EX(INTERNAL_InterpreterLogFile, W("InterpreterLogFile"), "If non-null, append interpreter logging to this file, else use stdout", CLRConfig::REGUTIL_default) +RETAIL_CONFIG_DWORD_INFO(INTERNAL_DumpInterpreterStubs, W("DumpInterpreterStubs"), 0, "Prints all interpreter stubs that are created to the console") +RETAIL_CONFIG_DWORD_INFO(INTERNAL_TraceInterpreterEntries, W("TraceInterpreterEntries"), 0, "Logs entries to interpreted methods to the console") +RETAIL_CONFIG_DWORD_INFO(INTERNAL_TraceInterpreterIL, W("TraceInterpreterIL"), 0, "Logs individual instructions of interpreted methods to the console") +RETAIL_CONFIG_DWORD_INFO(INTERNAL_TraceInterpreterOstack, W("TraceInterpreterOstack"), 0, "Logs operand stack after each IL instruction of interpreted methods to the console") CONFIG_DWORD_INFO(INTERNAL_TraceInterpreterVerbose, W("TraceInterpreterVerbose"), 0, "Logs interpreter progress with detailed messages to the console") CONFIG_DWORD_INFO(INTERNAL_TraceInterpreterJITTransition, W("TraceInterpreterJITTransition"), 0, "Logs when the interpreter determines a method should be JITted") #endif diff --git a/src/vm/interpreter.cpp b/src/vm/interpreter.cpp index d92bf16aced3..3766b6483243 100644 --- a/src/vm/interpreter.cpp +++ b/src/vm/interpreter.cpp @@ -903,9 +903,10 @@ CorJitResult Interpreter::GenerateInterpreterStub(CEEInfo* comp, #endif { // But we also have to use r4, because ThumbEmitCondRegJump below requires a low register. + sl.ThumbEmitMovConstant(r11, 0); sl.ThumbEmitMovConstant(r12, UINT_PTR(interpMethInfo)); sl.ThumbEmitLoadRegIndirect(r12, r12, offsetof(InterpreterMethodInfo, m_jittedCode)); - sl.ThumbEmitCmpImm(r12, 0); // Set condition codes. + sl.ThumbEmitCmpReg(r12, r11); // Set condition codes. // If r12 is zero, then go on to do the interpretation. CodeLabel* doInterpret = sl.NewCodeLabel(); sl.ThumbEmitCondFlagJump(doInterpret, thumbCondEq.cond); @@ -1578,7 +1579,7 @@ CorJitResult Interpreter::GenerateInterpreterStub(CEEInfo* comp, #else #error unsupported platform #endif - stub = sl.Link(); + stub = sl.Link(SystemDomain::GetGlobalLoaderAllocator()->GetStubHeap()); *nativeSizeOfCode = static_cast(stub->GetNumCodeBytes()); // TODO: manage reference count of interpreter stubs. Look for examples... @@ -8607,6 +8608,8 @@ void Interpreter::BoxStructRefAt(unsigned ind, CORINFO_CLASS_HANDLE valCls) if (th.IsTypeDesc()) COMPlusThrow(kInvalidOperationException,W("InvalidOperation_TypeCannotBeBoxed")); + MethodTable* pMT = th.AsMethodTable(); + { Object* res = OBJECTREFToObject(pMT->Box(valPtr)); @@ -9578,7 +9581,9 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T // This is the argument slot that will be used to hold the return value. ARG_SLOT retVal = 0; +#ifndef _ARM_ _ASSERTE (NUMBER_RETURNVALUE_SLOTS == 1); +#endif // If the return type is a structure, then these will be initialized. CORINFO_CLASS_HANDLE retTypeClsHnd = NULL; @@ -10316,15 +10321,19 @@ void Interpreter::CallI() } else { - pMD = g_pPrepareConstrainedRegionsMethod; // A random static method. + pMD = g_pExecuteBackoutCodeHelperMethod; // A random static method. } MethodDescCallSite mdcs(pMD, &mSig, ftnPtr); +#if 0 // If the current method being interpreted is an IL stub, we're calling native code, so // change the GC mode. (We'll only do this at the call if the calling convention turns out // to be a managed calling convention.) MethodDesc* pStubContextMD = reinterpret_cast(m_stubContext); bool transitionToPreemptive = (pStubContextMD != NULL && !pStubContextMD->IsIL()); mdcs.CallTargetWorker(args, &retVal, sizeof(retVal), transitionToPreemptive); +#else + mdcs.CallTargetWorker(args, &retVal, sizeof(retVal)); +#endif } // retVal is now vulnerable. GCX_FORBID(); diff --git a/src/vm/interpreter.h b/src/vm/interpreter.h index 92835be92ee0..1151b3691355 100644 --- a/src/vm/interpreter.h +++ b/src/vm/interpreter.h @@ -718,7 +718,7 @@ class InterpreterCEEInfo: public CEEInfo { CEEJitInfo m_jitInfo; public: - InterpreterCEEInfo(CORINFO_METHOD_HANDLE meth): CEEInfo((MethodDesc*)meth), m_jitInfo((MethodDesc*)meth, NULL, NULL, CorJitFlag(0)) { m_pOverride = this; } + InterpreterCEEInfo(CORINFO_METHOD_HANDLE meth): CEEInfo((MethodDesc*)meth), m_jitInfo((MethodDesc*)meth, NULL, NULL, CORJIT_FLAGS::CORJIT_FLAG_SPEED_OPT) { m_pOverride = this; } // Certain methods are unimplemented by CEEInfo (they hit an assert). They are implemented by CEEJitInfo, yet // don't seem to require any of the CEEJitInfo state we can't provide. For those case, delegate to the "partial"