Implement DecomposeShift
authorMichelle McDaniel <adiaaida@gmail.com>
Tue, 30 Aug 2016 16:38:20 +0000 (09:38 -0700)
committerMichelle McDaniel <adiaaida@gmail.com>
Wed, 31 Aug 2016 02:24:24 +0000 (19:24 -0700)
commitad2a6674ba367b29db7d5cacc31d9050a5849ef6
tree70386a89524828037acaa5d6bc8db7a013f6b7c5
parent4b9e0f5956c6f061ecae02f3445c12d7ddeec7cd
Implement DecomposeShift

This change adds support for GT_LSH, GT_RSH, and GT_RSZ for x86 longs.
These nodes are implemented via helpers, so in decompose, we must remove
the shift node from the tree and replace it with a call to the helper.
Additionally, these helpers require that the long operand is in EAX:EDX,
so rather than adding a GT_LONG to the call arg list like we would
normally, we split the high and low parts of the arg and mark them as
non-standard args in gtMorphArgs to force the low part to be in EAX and
the high part to be in EDX. The shift amount is already defaulted to ECX,
which is where the helper expects it to be.

Commit migrated from https://github.com/dotnet/coreclr/commit/c06348f8f08356a081ab3713a6d749b7da2f79a9
src/coreclr/src/jit/compiler.h
src/coreclr/src/jit/decomposelongs.cpp
src/coreclr/src/jit/decomposelongs.h
src/coreclr/src/jit/gentree.cpp
src/coreclr/src/jit/morph.cpp
src/coreclr/src/jit/target.h