[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 10/16] tcg: Change temp_save argument to TCGTemp
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [RFC 10/16] tcg: Change temp_save argument to TCGTemp |
Date: |
Thu, 19 Sep 2013 14:25:02 -0700 |
Signed-off-by: Richard Henderson <address@hidden>
---
tcg/tcg.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 0ca8dbe..579541c 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1690,10 +1690,9 @@ static void temp_sync(TCGContext *s, TCGTemp *ts,
TCGRegSet allocated_regs)
/* save a temporary to memory. 'allocated_regs' is used in case a
temporary registers needs to be allocated to store a constant. */
-static inline void temp_save(TCGContext *s, int temp, TCGRegSet allocated_regs)
+static inline void temp_save(TCGContext *s, TCGTemp *ts,
+ TCGRegSet allocated_regs)
{
- TCGTemp *ts = &s->temps[temp];
-
#ifdef USE_LIVENESS_ANALYSIS
/* The liveness analysis already ensures that globals are back
in memory. Keep an assert for safety. */
@@ -1711,8 +1710,8 @@ static void save_globals(TCGContext *s, TCGRegSet
allocated_regs)
{
int i;
- for(i = 0; i < s->nb_globals; i++) {
- temp_save(s, i, allocated_regs);
+ for (i = 0; i < s->nb_globals; i++) {
+ temp_save(s, &s->temps[i], allocated_regs);
}
}
@@ -1739,13 +1738,12 @@ static void sync_globals(TCGContext *s, TCGRegSet
allocated_regs)
all globals are stored at their canonical location. */
static void tcg_reg_alloc_bb_end(TCGContext *s, TCGRegSet allocated_regs)
{
- TCGTemp *ts;
int i;
- for(i = s->nb_globals; i < s->nb_temps; i++) {
- ts = &s->temps[i];
+ for (i = s->nb_globals; i < s->nb_temps; i++) {
+ TCGTemp *ts = &s->temps[i];
if (ts->temp_local) {
- temp_save(s, i, allocated_regs);
+ temp_save(s, ts, allocated_regs);
} else {
#ifdef USE_LIVENESS_ANALYSIS
/* The liveness analysis already ensures that temps are dead.
--
1.8.1.4
- [Qemu-devel] [RFC 00/16] TCG indirect registers, Richard Henderson, 2013/09/19
- [Qemu-devel] [RFC 02/16] tcg: Introduce TCGTempType, Richard Henderson, 2013/09/19
- [Qemu-devel] [RFC 01/16] tcg: Change tcg_global_mem_new_* to take a TCGv_ptr, Richard Henderson, 2013/09/19
- [Qemu-devel] [RFC 03/16] tcg: Change ts->mem_reg to ts->mem_base, Richard Henderson, 2013/09/19
- [Qemu-devel] [RFC 04/16] tcg: Compress TCGLabelQemuLdst, Richard Henderson, 2013/09/19
- [Qemu-devel] [RFC 05/16] tcg: More use of TCGReg where appropriate, Richard Henderson, 2013/09/19
- [Qemu-devel] [RFC 06/16] tcg: Remove tcg_get_arg_str_i32/64, Richard Henderson, 2013/09/19
- [Qemu-devel] [RFC 07/16] tcg: Change reg_to_temp to TCGTemp pointer, Richard Henderson, 2013/09/19
- [Qemu-devel] [RFC 08/16] tcg: Change temp_dead argument to TCGTemp, Richard Henderson, 2013/09/19
- [Qemu-devel] [RFC 09/16] tcg: Change temp_sync argument to TCGTemp, Richard Henderson, 2013/09/19
- [Qemu-devel] [RFC 10/16] tcg: Change temp_save argument to TCGTemp,
Richard Henderson <=
- [Qemu-devel] [RFC 11/16] tcg: Introduce temp_load, Richard Henderson, 2013/09/19
- [Qemu-devel] [RFC 12/16] tcg: Tidy temporary allocation, Richard Henderson, 2013/09/19
- [Qemu-devel] [RFC 13/16] tcg: Use temp_idx, Richard Henderson, 2013/09/19
- [Qemu-devel] [RFC 14/16] tcg: Implement indirect memory registers, Richard Henderson, 2013/09/19
- [Qemu-devel] [RFC 15/16] target-sparc: Tidy global register initialization, Richard Henderson, 2013/09/19
- [Qemu-devel] [RFC 16/16] target-sparc: Use global registers for the register window, Richard Henderson, 2013/09/19
- Re: [Qemu-devel] [RFC 00/16] TCG indirect registers, Max Filippov, 2013/09/22
- Re: [Qemu-devel] [RFC 00/16] TCG indirect registers, Blue Swirl, 2013/09/23