Fix dotnet/coreclr#3554. (dotnet/coreclr#6880)
authorPat Gavlin <pgavlin@gmail.com>
Wed, 24 Aug 2016 22:50:04 +0000 (15:50 -0700)
committerGitHub <noreply@github.com>
Wed, 24 Aug 2016 22:50:04 +0000 (15:50 -0700)
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).

Commit migrated from https://github.com/dotnet/coreclr/commit/2c38643f91d98a278d8084c2d776d927a4405e16

src/coreclr/src/jit/emitxarch.cpp
src/coreclr/tests/issues.targets

index 3ab7e15..f9ab597 100644 (file)
@@ -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.
index d39e389..e40477c 100644 (file)
     <!-- The following x86 failures only occur with RyuJIT/x86 -->
 
     <ItemGroup Condition="'$(XunitTestBinBase)' != '' and '$(BuildArch)' == 'x86'">
-        <ExcludeList Include="$(XunitTestBinBase)\JIT\Methodical\stringintern\_Simpletest1\_Simpletest1.cmd">
-             <Issue>3554</Issue>
-        </ExcludeList>
-        <ExcludeList Include="$(XunitTestBinBase)\JIT\Methodical\stringintern\_XAssemblytest1-xassem\_XAssemblytest1-xassem.cmd">
-             <Issue>3554</Issue>
-        </ExcludeList>
-        <ExcludeList Include="$(XunitTestBinBase)\JIT\Methodical\stringintern\_XModuletest1-xmod\_XModuletest1-xmod.cmd">
-             <Issue>3554</Issue>
-        </ExcludeList>
-        <ExcludeList Include="$(XunitTestBinBase)\JIT\Methodical\stringintern\test1-xassem\test1-xassem.cmd">
-             <Issue>3554</Issue>
-        </ExcludeList>
-        <ExcludeList Include="$(XunitTestBinBase)\JIT\Methodical\stringintern\test4-xassem\test4-xassem.cmd">
-             <Issue>3554</Issue>
-        </ExcludeList>
-        <ExcludeList Include="$(XunitTestBinBase)\JIT\Methodical\stringintern\_Simpletest4\_Simpletest4.cmd">
-             <Issue>3554</Issue>
-        </ExcludeList>
-        <ExcludeList Include="$(XunitTestBinBase)\JIT\Methodical\stringintern\_XAssemblytest4-xassem\_XAssemblytest4-xassem.cmd">
-             <Issue>3554</Issue>
-        </ExcludeList>
-        <ExcludeList Include="$(XunitTestBinBase)\JIT\Methodical\stringintern\_XModuletest4-xmod\_XModuletest4-xmod.cmd">
-             <Issue>3554</Issue>
-        </ExcludeList>
         <ExcludeList Include="$(XunitTestBinBase)\JIT\Performance\CodeQuality\Serialization\Serialize\Serialize.cmd">
              <Issue>3597</Issue>
         </ExcludeList>
-        <ExcludeList Include="$(XunitTestBinBase)\JIT\Performance\CodeQuality\V8\DeltaBlue\DeltaBlue\DeltaBlue.cmd">
-             <Issue>4817</Issue>
-        </ExcludeList>
         <ExcludeList Include="$(XunitTestBinBase)\JIT\Methodical\MDArray\basics\stringarr_cs_do\stringarr_cs_do.cmd">
              <Issue>4844</Issue>
         </ExcludeList>