From: Bruce Forstall Date: Fri, 22 Apr 2016 01:14:39 +0000 (-0700) Subject: Fix #3570: RyuJIT x86: Float/Double mismatch in CodeGen::genStoreInd() X-Git-Tag: accepted/tizen/base/20180629.140029~4927^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8a9584d35e4e8e186c9e88851392eb8e0112121a;p=platform%2Fupstream%2Fcoreclr.git Fix #3570: RyuJIT x86: Float/Double mismatch in CodeGen::genStoreInd() There is code in the importer to insert explicit converts between float and double but it was only running for _TARGET_64BIT_. I changed this to a more appropriate !_LEGACY_BACKEND_. --- diff --git a/src/jit/importer.cpp b/src/jit/importer.cpp index f738bfe..975607f 100644 --- a/src/jit/importer.cpp +++ b/src/jit/importer.cpp @@ -2621,12 +2621,12 @@ GenTreePtr Compiler::impImplicitIorI4Cast(GenTreePtr tree, GenTreePtr Compiler::impImplicitR4orR8Cast(GenTreePtr tree, var_types dstTyp) { -#ifdef _TARGET_64BIT_ +#ifndef LEGACY_BACKEND if (varTypeIsFloating(tree) && varTypeIsFloating(dstTyp) && (dstTyp != tree->gtType)) { tree = gtNewCastNode(dstTyp, tree, dstTyp); } -#endif // _TARGET_64BIT_ +#endif // !LEGACY_BACKEND return tree; } @@ -9818,7 +9818,7 @@ ARR_LD_POST_VERIFY: { arrayElem = typeInfo::nativeInt(); } -#endif // _TARGET_64_BIT +#endif // _TARGET_64BIT_ Verify(tiArray.IsNullObjRef() || typeInfo::AreEquivalent(verGetArrayElemType(tiArray), arrayElem), "bad array"); @@ -9887,7 +9887,6 @@ ARR_LD_POST_VERIFY: } else { - // On Amd64 add an explicit cast between float and double op2 = impImplicitR4orR8Cast(op2, op1->TypeGet()); op1 = gtNewAssignNode(op1, op2); } @@ -10822,7 +10821,6 @@ STIND_POST_VERIFY: impBashVarAddrsToI(op1, op2); - // On Amd64 add an explicit cast between float and double op2 = impImplicitR4orR8Cast(op2, lclTyp); #ifdef _TARGET_64BIT_