tcg-ppc64: Avoid code for nop move

While these are rare from code that's been through the optimizer,
it's not uncommon within the tcg backend.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-ppc64: Add an LK argument to tcg_out_call

This will enable the generation of tail-calls in a future patch.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-ppc64: Use the branch absolute instruction when possible

... before falling back to an indirect branch.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-ppc64: Don't load the static chain from TCG

There are no helpers that require the static chain.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-ppc64: Look through the function descriptor when profitable

Loading 32-bit immediates instead of memory will be faster.
Don't attempt to generate full 64-bit immediates.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-ppc64: Move AREG0 to r31

Now that AREG0 doesn't need to be a global register, non-conflicting
with the normal frame pointer, move it out of the middle of the set.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-ppc64: Tidy register allocation order

Remove conditionalization from tcg_target_reg_alloc_order, relying on
reserved_regs to prevent register allocation that shouldn't happen.
So R11 is now present in reg_alloc_order for __APPLE__, but also now
reserved.

Sort reg_alloc_order into call-saved, call-clobbered, and parameters.
This reduces the effect of values getting spilled and reloaded before
function calls.

Whether or not it is reserved, R2 (TOC) is always call-clobbered.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-ppc64: Create PowerOpcode

This makes some bits easier to debug, being presented with a symbol
instead of a number inside gdb.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-ppc64: Handle long offsets better

Previously we'd only handle 16-bit offsets from memory operand
without falling back to indexed, but it's easy to use ADDIS to
handle full 32-bit offsets.

This also lets us unify code that existed inline in tcg_out_op
for handling addition of large constants.

Signed-off-by: Richard Henderson <rth@twiddle.net>