tcg: Use per-temp state data in optimize
While we're touching many of the lines anyway, adjust the naming
of the functions to better distinguish when "TCGArg" vs "TCGTemp"
should be used.
Reviewed-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
diff --git a/tcg/tcg.h b/tcg/tcg.h
index c508052..563e7d3 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -751,6 +751,11 @@
return a == TCG_CALL_DUMMY_ARG ? NULL : &tcg_ctx.temps[a];
}
+static inline size_t arg_index(TCGArg a)
+{
+ return a;
+}
+
static inline void tcg_set_insn_param(int op_idx, int arg, TCGArg v)
{
tcg_ctx.gen_op_buf[op_idx].args[arg] = v;