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.

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

src/coreclr/src/jit/morph.cpp

index 5fe3bed..6a6567e 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_
             }