Properly initialize the varargs base lclVar.
authorPat Gavlin <pagavlin@microsoft.com>
Fri, 21 Oct 2016 21:39:18 +0000 (14:39 -0700)
committerPat Gavlin <pagavlin@microsoft.com>
Fri, 21 Oct 2016 21:39:18 +0000 (14:39 -0700)
The code that initializes this lclVar was not using the correct helper
to determine whether or not a lclVar was enregistered at the beginning
of a method.

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

src/coreclr/src/jit/codegencommon.cpp

index 2f83045..ade2dea 100755 (executable)
@@ -8997,7 +8997,7 @@ void CodeGen::genFnProlog()
         // LEA EAX, &<VARARGS HANDLE> + EAX
         getEmitter()->emitIns_R_ARR(INS_lea, EA_PTRSIZE, REG_EAX, genFramePointerReg(), REG_EAX, offset);
 
-        if (varDsc->lvRegister)
+        if (varDsc->lvIsInReg())
         {
             if (varDsc->lvRegNum != REG_EAX)
             {