Rewrite how PowerPC ncg does conditional branches and tests.
authorGeorge Koehler <xkernigh@netscape.net>
Thu, 26 Jan 2017 00:08:55 +0000 (19:08 -0500)
committerGeorge Koehler <xkernigh@netscape.net>
Thu, 26 Jan 2017 00:08:55 +0000 (19:08 -0500)
commitf64b7d8ea08a91aeb571cf38c919e2c0dd9609f0
treece9d0ff7ee88ace768b8074ee937073a64a5eaaa
parenta348853eced4b8836e7dbb2be696829d638bfab7
Rewrite how PowerPC ncg does conditional branches and tests.

The rewritten code rules bring 3 new features:

  1.  The new rules compare a small constant with a register by
      reversing the comparison and using `cmpwi` or `cmplwi`.  The old
      rules put the constant in a register.

  2.  The new rules emit shorter code to yield the test results,
      without referencing the tables in mach/powerpc/ncg/tge.s.

  3.  The new rules use the extended `beq` and relatives, not the
      basic `bc`, in the assembly output.

I delete the old tristate tokens and the old moves, because they
confused me.  Some of the old moves weren't really moves.  For
example, `move R3, C0` and then `move C0, R0` did not move r3 to r0.

I rename C0 to CR0.
mach/powerpc/ncg/table