diff options
author | Taylor Simpson <tsimpson@quicinc.com> | 2023-04-27 16:00:08 -0700 |
---|---|---|
committer | Taylor Simpson <tsimpson@quicinc.com> | 2023-05-18 12:40:52 -0700 |
commit | 4ff5676474cff9afd02c4755d97b0438e764f9d9 (patch) | |
tree | 06f73f535e60c6c49b89c9cd7e84f202a98b50ab /target/hexagon/genptr.c | |
parent | 6aa4f1d15ca8f843d92cf8e431a03d5b1278054c (diff) |
Hexagon (target/hexagon) Move new_value to DisasContext
The new_value array in the CPUHexagonState is only used for bookkeeping
within the translation of a packet. With recent changes that eliminate
the need to free TCGv variables, these make more sense to be transient
and kept in DisasContext.
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230427230012.3800327-18-tsimpson@quicinc.com>
Diffstat (limited to 'target/hexagon/genptr.c')
-rw-r--r-- | target/hexagon/genptr.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/target/hexagon/genptr.c b/target/hexagon/genptr.c index bfcb962a3d..37210e6f09 100644 --- a/target/hexagon/genptr.c +++ b/target/hexagon/genptr.c @@ -74,7 +74,11 @@ TCGv get_result_gpr(DisasContext *ctx, int rnum) if (rnum == HEX_REG_USR) { return hex_new_value_usr; } else { - return hex_new_value[rnum]; + if (ctx->new_value[rnum] == NULL) { + ctx->new_value[rnum] = tcg_temp_new(); + tcg_gen_movi_tl(ctx->new_value[rnum], 0); + } + return ctx->new_value[rnum]; } } else { return hex_gpr[rnum]; |