From: Pat Gavlin Date: Wed, 24 Aug 2016 22:50:04 +0000 (-0700) Subject: Fix #3554. (#6880) X-Git-Tag: accepted/tizen/base/20180629.140029~3743 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2c38643f91d98a278d8084c2d776d927a4405e16;p=platform%2Fupstream%2Fcoreclr.git Fix #3554. (#6880) On x86, `emitter::emitInsBinary` was calling `genProduceReg` on the `dst` tree if the source was a contained class field load and the destination was a register. As per the comment on the offending function, it is the caller's responsibility to call `genProduceReg` for the destination register, if any. This was causing errors in GC ref reporting on x86. This issue did not appear on x64 because AFAICT we very nearly always morph class field loads into loads of a `CNS_INT` handle (see morph.cpp:6344 in `fgMorphField` for details). --- diff --git a/src/jit/emitxarch.cpp b/src/jit/emitxarch.cpp index 3ab7e15..f9ab597 100644 --- a/src/jit/emitxarch.cpp +++ b/src/jit/emitxarch.cpp @@ -2975,7 +2975,6 @@ regNumber emitter::emitInsBinary(instruction ins, emitAttr attr, GenTree* dst, G // src is a class static variable // dst is a register emitIns_R_C(ins, attr, dst->gtRegNum, memBase->gtClsVar.gtClsVarHnd, 0); - codeGen->genProduceReg(dst); } } else // The memory op is in the dest position. diff --git a/tests/issues.targets b/tests/issues.targets index d39e389..e40477c 100644 --- a/tests/issues.targets +++ b/tests/issues.targets @@ -266,36 +266,9 @@ - - 3554 - - - 3554 - - - 3554 - - - 3554 - - - 3554 - - - 3554 - - - 3554 - - - 3554 - 3597 - - 4817 - 4844