Skip to content

Commit

Permalink
Rewrite how PowerPC ncg does conditional branches and tests.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kernigh committed Jan 26, 2017
1 parent a348853 commit f64b7d8
Showing 1 changed file with 490 additions and 189 deletions.
Loading

0 comments on commit f64b7d8

Please sign in to comment.