Fix #3554. (#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)
commit2c38643f91d98a278d8084c2d776d927a4405e16
tree1c6986afc85aae4654a848cdae66d349012e1f07
parenta352d949e5342e13b1ac1f545711d7f5d12bd8ce
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
tests/issues.targets