Additional to fix dotnet/coreclr#12104 for CoreRT issue dotnet/coreclr#3672 (armel...
authorsergey ignatov <sergign60@mail.ru>
Wed, 14 Jun 2017 14:28:12 +0000 (17:28 +0300)
committerJan Kotas <jkotas@microsoft.com>
Wed, 14 Jun 2017 14:28:12 +0000 (07:28 -0700)
* Additional to fix dotnet/coreclr#12104 for CoreRT issue dotnet/coreclr#3672 (armel tizen)

* Fix for unregistered info.compLvFrameListRoot

Commit migrated from https://github.com/dotnet/coreclr/commit/9255b5ea1acac68f62207f03dab509de97da93a9

src/coreclr/src/jit/codegenlegacy.cpp
src/coreclr/src/jit/regalloc.cpp

index bde82ff..d59b371 100644 (file)
@@ -19236,11 +19236,21 @@ regMaskTP CodeGen::genCodeForCall(GenTreeCall* call, bool valUsed)
                     if ((call->gtFlags & GTF_CALL_NULLCHECK) == 0)
                         aflags = (CORINFO_ACCESS_FLAGS)(aflags | CORINFO_ACCESS_NONNULL);
 
-                    CORINFO_CONST_LOOKUP addrInfo;
-                    compiler->info.compCompHnd->getFunctionEntryPoint(methHnd, &addrInfo, aflags);
+#ifdef FEATURE_READYTORUN_COMPILER
+                    if (call->gtEntryPoint.addr != NULL)
+                    {
+                        accessType = call->gtEntryPoint.accessType;
+                        addr       = call->gtEntryPoint.addr;
+                    }
+                    else
+#endif // FEATURE_READYTORUN_COMPILER
+                    {
+                        CORINFO_CONST_LOOKUP addrInfo;
+                        compiler->info.compCompHnd->getFunctionEntryPoint(methHnd, &addrInfo, aflags);
 
-                    accessType = addrInfo.accessType;
-                    addr       = addrInfo.addr;
+                        accessType = addrInfo.accessType;
+                        addr       = addrInfo.addr;
+                    }
                 }
 
                 if (fTailCall)
index 30299e6..8403232 100644 (file)
@@ -6352,7 +6352,7 @@ void Compiler::rpPredictRegUse()
 
         // if there are PInvoke calls and compLvFrameListRoot is enregistered,
         // it must not be in a register trashed by the callee
-        if (info.compCallUnmanaged != 0)
+        if (info.compLvFrameListRoot != BAD_VAR_NUM)
         {
             assert(!opts.ShouldUsePInvokeHelpers());
             noway_assert(info.compLvFrameListRoot < lvaCount);