tcg-aarch64: Remove redundant CPU_TLB_ENTRY_BITS check

Removed from other targets in 56bbc2f967ce185fa1c5c39e1aeb5b68b26242e9.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-aarch64: Change all ext variables to TCGType

We assert that the values for _I32 and _I64 are 0 and 1 respectively.
This will make a couple of functions declared by tcg.c cleaner.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-aarch64: Set ext based on TCG_OPF_64BIT

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-aarch64: Don't handle mov/movi in tcg_out_op

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-aarch64: Hoist common argument loads in tcg_out_op

This reduces the code size of the function significantly.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-aarch64: Change enum aarch64_arith_opc to AArch64Insn

And since we're no longer talking about opcodes, change the
values to be shifted into the opcode field, avoiding a shift
at runtime.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-aarch64: Merge enum aarch64_srr_opc with AArch64Insn

And since we're no longer talking about opcodes, merge the 0x1ac02000
data2 primary opcode with the shift subcode to create the full insn.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-aarch64: Remove the shift_imm parameter from tcg_out_cmp

It was unused.  Let's not overcomplicate things before we need them.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-aarch64: Introduce tcg_fmt_Rdnm and tcg_fmt_Rdnm_lsl

Now that we've converted opcode fields to pre-shifted insns, we
can merge the implementation of arithmetic and shift insns.

Simplify the left/right shift parameter to just the left shift
needed by tcg_out_tlb_read.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-aarch64: Introduce tcg_fmt_Rdn_aimm

This merges the implementation of tcg_out_addi and tcg_out_subi.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-aarch64: Implement mov with tcg_fmt_* functions

Avoid the magic numbers in the current implementation.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-aarch64: Handle constant operands to add, sub, and compare

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-aarch64: Handle constant operands to and, or, xor

Handle a simplified set of logical immediates for the moment.

The way gcc and binutils do it, with 52k worth of tables, and
a binary search depth of log2(5334) = 13, seems slow for the
most common cases.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-aarch64: Support andc, orc, eqv, not

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-aarch64: Handle zero as first argument to sub

In order to properly handle neg, as generated by TCG generic code.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-aarch64: Support movcond

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-aarch64: Use tcg_fmt_Rdnm_cond for setcond

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-aarch64: Support deposit

Also tidy the implementation of ubfm, sbfm, extr in order to share code.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-aarch64: Support add2, sub2

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-aarch64: Support muluh, mulsh

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