aboutsummaryrefslogtreecommitdiff
path: root/tcg/tcg.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2013-09-18 12:53:09 -0700
committerRichard Henderson <rth@twiddle.net>2016-02-09 10:19:32 +1100
commite1ccc05444676b92c63708096e36582be27fbee1 (patch)
tree8a9d3260acc2e260157f602c3b7acf16b171bb4f /tcg/tcg.c
parent201577059331b8b3aef221ee2ed594deb99d6631 (diff)
tcg: Change tcg_global_mem_new_* to take a TCGv_ptr
Thus, use cpu_env as the parameter, not TCG_AREG0 directly. Update all uses in the translators. Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'tcg/tcg.c')
-rw-r--r--tcg/tcg.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index e6e844ca57..a66a1b3446 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -481,13 +481,12 @@ TCGv_i64 tcg_global_reg_new_i64(int reg, const char *name)
return MAKE_TCGV_I64(idx);
}
-static inline int tcg_global_mem_new_internal(TCGType type, int reg,
- intptr_t offset,
- const char *name)
+int tcg_global_mem_new_internal(TCGType type, TCGv_ptr base,
+ intptr_t offset, const char *name)
{
TCGContext *s = &tcg_ctx;
- TCGTemp *ts;
- int idx;
+ TCGTemp *ts, *base_ts = &s->temps[GET_TCGV_PTR(base)];
+ int idx, reg = base_ts->reg;
idx = s->nb_globals;
#if TCG_TARGET_REG_BITS == 32
@@ -542,18 +541,6 @@ static inline int tcg_global_mem_new_internal(TCGType type, int reg,
return idx;
}
-TCGv_i32 tcg_global_mem_new_i32(int reg, intptr_t offset, const char *name)
-{
- int idx = tcg_global_mem_new_internal(TCG_TYPE_I32, reg, offset, name);
- return MAKE_TCGV_I32(idx);
-}
-
-TCGv_i64 tcg_global_mem_new_i64(int reg, intptr_t offset, const char *name)
-{
- int idx = tcg_global_mem_new_internal(TCG_TYPE_I64, reg, offset, name);
- return MAKE_TCGV_I64(idx);
-}
-
static inline int tcg_temp_new_internal(TCGType type, int temp_local)
{
TCGContext *s = &tcg_ctx;