tcg: Invert the inclusion of helper.h

Rather than include helper.h with N values of GEN_HELPER, include a
secondary file that sets up the macros to include helper.h.  This
minimizes the files that must be rebuilt when changing the macros
for file N.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg: Push tcg-runtime routines into exec/helper-*

Rather than special casing them, use the standard mechanisms
for tcg helper generation.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg: Use helper-gen.h in tcg-op.h

No need to open-code the setup of the builtin helpers.

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

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg: Move side effects out of dh_sizemask

Moving them into dh_arg instead.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg: Register the helper info struct rather than the name

This will let us find all the info from the hash table.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg: Save flags and computed sizemask in TCGHelperInfo

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg: Remove sizemask and flags arguments to tcg_gen_callN

Take them from the TCGHelperInfo struct instead.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg: Move size effects out of dh_arg

Tidying the initialization of the args arrays at the same time.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg: Allow the debug_frame data structure to be constant

Adjust the FDE to point to the code_buffer after we've copied it
to the image, rather than requiring that the backend set it prior.
This allows the backend to use read-only storage for its data.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-i386: Make debug_frame const

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-aarch64: Make debug_frame const

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-arm: Make debug_frame const

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-s390: Make debug_frame const

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg-sparc: Make debug_frame const

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg/optimize: Move updating of gen_opc_buf into tcg_opt_gen_mov*

No functional change, just reduce a bit of redundancy.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg/optimize: Remember garbage high bits for 32-bit ops

For a 64-bit host, the high bits of a register after a 32-bit operation
are undefined.  Adjust the temps mask for all 32-bit ops to reflect that.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>