tcg: Move emit of INDEX_op_end into gen_tb_end

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg: Introduce tcg_op_buf_count and tcg_op_buf_full

The method by which we count the number of ops emitted
is going to change.  Abstract that away into some inlines.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg: Put opcodes in a linked list

The previous setup required ops and args to be completely sequential,
and was error prone when it came to both iteration and optimization.

Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg: Remove opcodes instead of noping them out

With the linked list scheme we need not leave nops in the stream
that we need to process later.

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

Rather reserving space in the op stream for optimization,
let the optimizer add ops as necessary.

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