[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 13/16] tcg: Use temp_idx
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [RFC 13/16] tcg: Use temp_idx |
Date: |
Thu, 19 Sep 2013 14:25:05 -0700 |
Signed-off-by: Richard Henderson <address@hidden>
---
tcg/tcg.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tcg/tcg.c b/tcg/tcg.c
index a69186a..3591491 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -808,7 +808,7 @@ static void tcg_reg_alloc_start(TCGContext *s)
static char *tcg_get_arg_str_ptr(TCGContext *s, char *buf, int buf_size,
TCGTemp *ts)
{
- int idx = ts - s->temps;
+ int idx = temp_idx(s, ts);
if (idx < s->nb_globals) {
pstrcpy(buf, buf_size, ts->name);
@@ -1593,7 +1593,7 @@ static inline void tcg_reg_sync(TCGContext *s, TCGReg reg)
assert(ts->val_type == TEMP_VAL_REG);
if (!ts->mem_coherent && !ts->fixed_reg) {
if (!ts->mem_allocated) {
- temp_allocate_frame(s, ts - s->temps);
+ temp_allocate_frame(s, temp_idx(s, ts));
}
tcg_out_st(s, ts->type, reg, ts->mem_base->reg, ts->mem_offset);
}
@@ -1673,7 +1673,7 @@ static void temp_load(TCGContext *s, TCGTemp *ts,
TCGRegSet desired_regs,
/* mark a temporary as dead. */
static inline void temp_dead(TCGContext *s, TCGTemp *ts)
{
- int idx = ts - s->temps;
+ int idx = temp_idx(s, ts);
if (ts->fixed_reg) {
return;
}
--
1.8.1.4
- [Qemu-devel] [RFC 03/16] tcg: Change ts->mem_reg to ts->mem_base, (continued)
- [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, 2013/09/19
- [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 <=
- [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