On 13 May 2015 at 20:09, Richard Henderson <r...@twiddle.net> wrote: > The extra information is not yet used but it is now available. > This requires minor changes through all of the tcg backends. > > Signed-off-by: Richard Henderson <r...@twiddle.net> > --- > softmmu_template.h | 50 > +++++++++++++++++++++++++++--------------------- > tcg/aarch64/tcg-target.c | 35 +++++++++++++++++---------------- > tcg/arm/tcg-target.c | 27 +++++++++++++------------- > tcg/i386/tcg-target.c | 37 +++++++++++++++++------------------ > tcg/ia64/tcg-target.c | 4 ++-- > tcg/mips/tcg-target.c | 26 ++++++++++++------------- > tcg/ppc/tcg-target.c | 26 ++++++++++++------------- > tcg/s390/tcg-target.c | 23 +++++++++++----------- > tcg/sparc/tcg-target.c | 6 +++--- > tcg/tcg-be-ldst.h | 3 +-- > tcg/tcg.h | 38 ++++++++++++++++++------------------ > tci.c | 47 ++++++++++++++++++++++----------------------- > 12 files changed, 163 insertions(+), 159 deletions(-) > > diff --git a/softmmu_template.h b/softmmu_template.h > index 16b0852..2935657 100644 > --- a/softmmu_template.h > +++ b/softmmu_template.h > @@ -168,10 +168,11 @@ static inline DATA_TYPE glue(io_read, > SUFFIX)(CPUArchState *env, > #ifdef SOFTMMU_CODE_ACCESS > static __attribute__((unused)) > #endif > -WORD_TYPE helper_le_ld_name(CPUArchState *env, target_ulong addr, int > mmu_idx, > - uintptr_t retaddr) > +WORD_TYPE helper_le_ld_name(CPUArchState *env, target_ulong addr, > + TCGMemOpIdx oi, uintptr_t retaddr) > { > - int index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1); > + size_t mmu_idx = get_mmuidx(oi);
We don't seem to be very consistent about what type we're using for mmu_idx. In the TCG backends changed in patch 1 (and in the prototype of this helper which we've just removed) we used 'int'; in the return type of get_mmuidx() we use 'unsigned'; and here we're using size_t... > diff --git a/tci.c b/tci.c > index 28292b3..a14717d 100644 > --- a/tci.c > +++ b/tci.c > @@ -420,35 +420,34 @@ static bool tci_compare64(uint64_t u0, uint64_t u1, > TCGCond condition) > } > > #ifdef CONFIG_SOFTMMU > -# define mmuidx tci_read_i(&tb_ptr) > # define qemu_ld_ub \ > - helper_ret_ldub_mmu(env, taddr, mmuidx, (uintptr_t)tb_ptr) > + helper_ret_ldub_mmu(env, taddr, oi, (uintptr_t)tb_ptr) Ah, this unbreaks the tci interpreter that patch 1 broke :-) -- PMM