Fix GT_MULHI register requirements
authorMike Danes <onemihaid@hotmail.com>
Sun, 13 Nov 2016 09:56:46 +0000 (11:56 +0200)
committerMike Danes <onemihaid@hotmail.com>
Tue, 15 Nov 2016 06:04:21 +0000 (08:04 +0200)
commit90172bedd4260e5038450e4e7ee4ad46f0e16afc
tree0407dc08d3fd1e045649925f32197d45b8b69b29
parent9044f2ecad8f54924618347fae1cf80e48b35e58
Fix GT_MULHI register requirements

We only care about the upper 32 bits of the 64 bit result and those are
in EDX. It doesn't make sense to set the destination candidate to EAX,
most of the time this will result in a useless `mov eax, edx` being
generated.

Also, genCodeForMulHi needs to check if the implicit operand is in EAX
rather than targetReg.

Commit migrated from https://github.com/dotnet/coreclr/commit/0822b57867aaae098239022e7ebaef745588b8a4
src/coreclr/src/jit/codegenxarch.cpp
src/coreclr/src/jit/lowerxarch.cpp