From 2c38643f91d98a278d8084c2d776d927a4405e16 Mon Sep 17 00:00:00 2001 From: Pat Gavlin Date: Wed, 24 Aug 2016 15:50:04 -0700 Subject: [PATCH] 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). --- src/jit/emitxarch.cpp | 1 - tests/issues.targets | 27 --------------------------- 2 files changed, 28 deletions(-) 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 -- 2.7.4