Fix check for float args under windows x64 remorph
authorJoseph Tremoulet <jotrem@microsoft.com>
Wed, 2 Nov 2016 15:46:06 +0000 (11:46 -0400)
committerJoseph Tremoulet <JCTremoulet@gmail.com>
Fri, 4 Nov 2016 03:57:46 +0000 (23:57 -0400)
When re-morphing, `argx` will not have the argument's type if the argument
has been moved to the late args list, so check the arg table entry
instead.  The unix x64 codepath already had the correct code, so just
remove the ifdef.

src/jit/morph.cpp

index 5fe3bedc02e1303e72237d768fcbe088d64da034..6a6567ee18809f7a05bc6e322e776ca4083f8f44 100644 (file)
@@ -3221,7 +3221,6 @@ GenTreeCall* Compiler::fgMorphArgs(GenTreeCall* callNode)
         }
 
 #elif defined(_TARGET_AMD64_)
-#if defined(UNIX_AMD64_ABI)
         if (reMorphing)
         {
             passUsingFloatRegs = isValidFloatArgReg(argEntry->regNum);
@@ -3230,9 +3229,6 @@ GenTreeCall* Compiler::fgMorphArgs(GenTreeCall* callNode)
         {
             passUsingFloatRegs = varTypeIsFloating(argx);
         }
-#else  // WINDOWS_AMD64_ABI
-        passUsingFloatRegs = varTypeIsFloating(argx);
-#endif // !UNIX_AMD64_ABI
 #elif defined(_TARGET_X86_)
 
         passUsingFloatRegs = false;
@@ -3867,7 +3863,7 @@ GenTreeCall* Compiler::fgMorphArgs(GenTreeCall* callNode)
                     }
                 }
 #else  // !defined(UNIX_AMD64_ABI)
-                isRegArg   = (intArgRegNum + (size - 1)) < maxRegArgs;
+                isRegArg = (intArgRegNum + (size - 1)) < maxRegArgs;
 #endif // !defined(UNIX_AMD64_ABI)
 #endif // _TARGET_ARM_
             }