Refactor how powerpc ncg pushes constants.
authorGeorge Koehler <xkernigh@netscape.net>
Sun, 16 Oct 2016 17:58:54 +0000 (13:58 -0400)
committerGeorge Koehler <xkernigh@netscape.net>
Sun, 16 Oct 2016 17:58:54 +0000 (13:58 -0400)
commit7c64dab491e191a7a67a977d62cd8c332f87725a
treef7551797b990132c81f2c55719ef781886adde5d
parentbaa152217e65f26a3d2a40b7bbcc3f2ebf052292
Refactor how powerpc ncg pushes constants.

When loc (load constant) pushes a constant, it now checks the value of
the constant and pushes any of 7 tokens.  These tokens allow stack
patterns to recognize 16-bit signed integers (CONST2), 16-bit unsigned
integers (UCONST2), multiples of 0x10000 (CONST_HZ), and other
interesting forms of constants.

Use the new constant tokens in the rules for adi, sbi, and, ior, xor.
Adjust a few other rules to understand the new tokens.

Require that SUM_RC has a signed 16-bit constant, and OR_RC and XOR_RC
each have an unsigned 16-bit constant.  The moves from SUM_RC, OR_RC,
XOR_RC to GPR no longer touch the scratch register, because the
constant is not too big.
mach/powerpc/ncg/table