[RyuJIT/ARM32] Correct handling of double registers in registerIsAvailable()
authorAlexander Soldatov <soldatov.a@samsung.com>
Thu, 31 Aug 2017 18:14:07 +0000 (21:14 +0300)
committerAlexander Soldatov <soldatov.a@samsung.com>
Thu, 31 Aug 2017 18:29:34 +0000 (21:29 +0300)
Commit migrated from https://github.com/dotnet/coreclr/commit/973fd568a6efd238080fe7b23973c1340d675c35

src/coreclr/src/jit/lsra.cpp

index 522ec92..9ec680e 100644 (file)
@@ -5219,8 +5219,7 @@ bool LinearScan::registerIsAvailable(RegRecord*    physRegRecord,
     if (regType == TYP_DOUBLE)
     {
         // Recurse, but check the other half this time (TYP_FLOAT)
-        if (!registerIsAvailable(getRegisterRecord(REG_NEXT(physRegRecord->regNum)), currentLoc, nextRefLocationPtr,
-                                 TYP_FLOAT))
+        if (!registerIsAvailable(findAnotherHalfRegRec(physRegRecord), currentLoc, nextRefLocationPtr, TYP_FLOAT))
             return false;
         nextRefLocation = *nextRefLocationPtr;
     }