aboutsummaryrefslogtreecommitdiff
path: root/tcg/tcg.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2018-02-22 18:17:57 -0800
committerRichard Henderson <richard.henderson@linaro.org>2018-05-01 11:56:16 -0700
commit5bfa803448638a45542441fd6b7cc1241403ea72 (patch)
tree213f164dd23d4ff19383bbcd4a6fa0a8b6630901 /tcg/tcg.c
parent9a938d86b04025ac605db0ea9819e5896bf576ec (diff)
tcg: Improve TCGv_ptr support
Drop TCGV_PTR_TO_NAT and TCGV_NAT_TO_PTR internal macros. Add tcg_temp_local_new_ptr, tcg_gen_brcondi_ptr, tcg_gen_ext_i32_ptr, tcg_gen_trunc_i64_ptr, tcg_gen_extu_ptr_i64, tcg_gen_trunc_ptr_i32. Use inlines instead of macros where possible. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg/tcg.c')
-rw-r--r--tcg/tcg.c31
1 files changed, 2 insertions, 29 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index bb24526c93..b5e706bc49 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -980,7 +980,7 @@ TCGTemp *tcg_global_mem_new_internal(TCGType type, TCGv_ptr base,
return ts;
}
-static TCGTemp *tcg_temp_new_internal(TCGType type, int temp_local)
+TCGTemp *tcg_temp_new_internal(TCGType type, bool temp_local)
{
TCGContext *s = tcg_ctx;
TCGTemp *ts;
@@ -1025,18 +1025,6 @@ static TCGTemp *tcg_temp_new_internal(TCGType type, int temp_local)
return ts;
}
-TCGv_i32 tcg_temp_new_internal_i32(int temp_local)
-{
- TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I32, temp_local);
- return temp_tcgv_i32(t);
-}
-
-TCGv_i64 tcg_temp_new_internal_i64(int temp_local)
-{
- TCGTemp *t = tcg_temp_new_internal(TCG_TYPE_I64, temp_local);
- return temp_tcgv_i64(t);
-}
-
TCGv_vec tcg_temp_new_vec(TCGType type)
{
TCGTemp *t;
@@ -1072,7 +1060,7 @@ TCGv_vec tcg_temp_new_vec_matching(TCGv_vec match)
return temp_tcgv_vec(t);
}
-static void tcg_temp_free_internal(TCGTemp *ts)
+void tcg_temp_free_internal(TCGTemp *ts)
{
TCGContext *s = tcg_ctx;
int k, idx;
@@ -1093,21 +1081,6 @@ static void tcg_temp_free_internal(TCGTemp *ts)
set_bit(idx, s->free_temps[k].l);
}
-void tcg_temp_free_i32(TCGv_i32 arg)
-{
- tcg_temp_free_internal(tcgv_i32_temp(arg));
-}
-
-void tcg_temp_free_i64(TCGv_i64 arg)
-{
- tcg_temp_free_internal(tcgv_i64_temp(arg));
-}
-
-void tcg_temp_free_vec(TCGv_vec arg)
-{
- tcg_temp_free_internal(tcgv_vec_temp(arg));
-}
-
TCGv_i32 tcg_const_i32(int32_t val)
{
TCGv_i32 t0;