03.11.2015 11:00, Julio Guerra wrote: > Ping :) Well, I'm not sure what can I do with this. I've no idea what is IBAT to start with, so while technically the patch is a one-liner, I've no idea what it does and how trivial it is :)
Maybe you can include some context which teaches me what it is all about, and in that case it becomes really trivial, or.. I dunno :) Thanks, /mjt > Le mer. 14 oct. 2015 19:43, Julio Guerra <ju...@farjump.io > <mailto:ju...@farjump.io>> a écrit : > > Fix the index used to read the IBAT's vector which results in IBAT0..3 > instead > of IBAT4..N. > > The bug appeared by saving/restoring contexts including IBATs values. > > Signed-off-by: Julio Guerra <ju...@farjump.io <mailto:ju...@farjump.io>> > --- > target-ppc/translate_init.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c > index b541473..76d9a02 100644 > --- a/target-ppc/translate_init.c > +++ b/target-ppc/translate_init.c > @@ -305,7 +305,7 @@ static void spr_read_ibat (DisasContext *ctx, int > gprn, int sprn) > > static void spr_read_ibat_h (DisasContext *ctx, int gprn, int sprn) > { > - tcg_gen_ld_tl(cpu_gpr[gprn], cpu_env, offsetof(CPUPPCState, > IBAT[sprn & 1][(sprn - SPR_IBAT4U) / 2])); > + tcg_gen_ld_tl(cpu_gpr[gprn], cpu_env, offsetof(CPUPPCState, > IBAT[sprn & 1][((sprn - SPR_IBAT4U) / 2) + 4])); > } > > static void spr_write_ibatu (DisasContext *ctx, int sprn, int gprn) > -- > 2.5.2 >