[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v6 21/50] tcg: Use pointers in TCGOp->args
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH v6 21/50] tcg: Use pointers in TCGOp->args |
Date: |
Mon, 16 Oct 2017 10:25:40 -0700 |
This limits the indexing into tcg_ctx.temps to initial
opcode generation time.
Signed-off-by: Richard Henderson <address@hidden>
---
tcg/tcg.h | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/tcg/tcg.h b/tcg/tcg.h
index ccf1bcdaf6..d5bf61b1cf 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -741,24 +741,29 @@ static inline size_t temp_idx(TCGTemp *ts)
return n;
}
+static inline TCGTemp *idx_temp(size_t n)
+{
+ return n == TCG_CALL_DUMMY_ARG ? NULL : &tcg_ctx.temps[n];
+}
+
static inline TCGArg temp_arg(TCGTemp *ts)
{
- return temp_idx(ts);
+ return (uintptr_t)ts;
}
static inline TCGTemp *arg_temp(TCGArg a)
{
- return a == TCG_CALL_DUMMY_ARG ? NULL : &tcg_ctx.temps[a];
+ return (TCGTemp *)a;
}
static inline size_t arg_index(TCGArg a)
{
- return a;
+ return temp_idx(arg_temp(a));
}
static inline TCGArg index_arg(size_t n)
{
- return n;
+ return temp_arg(idx_temp(n));
}
static inline TCGArg tcgv_i32_arg(TCGv_i32 t)
--
2.13.6
- Re: [Qemu-devel] [PATCH v6 16/50] tcg: Push tcg_ctx into tcg_gen_callN, (continued)
- [Qemu-devel] [PATCH v6 18/50] tcg: Reserve temporary index 0, Richard Henderson, 2017/10/16
- [Qemu-devel] [PATCH v6 17/50] tcg: Introduce index_arg, Richard Henderson, 2017/10/16
- [Qemu-devel] [PATCH v6 19/50] target/alpha: Avoid translate_init unless tcg_enabled, Richard Henderson, 2017/10/16
- [Qemu-devel] [PATCH v6 14/50] tcg: Use per-temp state data in optimize, Richard Henderson, 2017/10/16
- [Qemu-devel] [PATCH v6 21/50] tcg: Use pointers in TCGOp->args,
Richard Henderson <=
- [Qemu-devel] [PATCH v6 20/50] qom: Introduce CPUClass.tcg_initialize, Richard Henderson, 2017/10/16
- [Qemu-devel] [PATCH v6 23/50] hack dump tb->flags and tb->cflags, Richard Henderson, 2017/10/16
- [Qemu-devel] [PATCH v6 24/50] tcg: Add CPUState step_next_tb, Richard Henderson, 2017/10/16
- [Qemu-devel] [PATCH v6 22/50] tcg: define CF_PARALLEL and use it for TB hashing along with CF_COUNT_MASK, Richard Henderson, 2017/10/16