Message ID | 20241104001900.682660-3-npiggin@gmail.com |
---|---|
State | New |
Headers | show |
Series | [PULL,01/67] target/ppc: Set ctx->opcode for decode_insn32() | expand |
04.11.2024 03:17, Nicholas Piggin wrote: > From: Ilya Leoshkevich <iii@linux.ibm.com> > > This is like commit 86e6202a57b1 ("target/ppc: Make divw[u] handler > method decodetree compatible."), but for gen_op_arith_divd(). 86e6202a57b1 is v9.0.0-880-g86e6202a57b1, ie, it is in 9.1 only. So I wonder what should we do for older stable series (namely for 8.2 lts and 9.0), -- should we pick this one together with the mentioned 86e6202a57b1, or neither? A separate question is whenever it makes sense to pick these for 7.2? Thanks, /mjt > Cc: qemu-stable@nongnu.org > Suggested-by: Richard Henderson <richard.henderson@linaro.org> > Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> > Reviewed-by: Richard Henderson <richard.henderson@linaro.org> > Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> > Signed-off-by: Nicholas Piggin <npiggin@gmail.com> > --- > target/ppc/translate.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target/ppc/translate.c b/target/ppc/translate.c > index be93777cf6..47ca50a064 100644 > --- a/target/ppc/translate.c > +++ b/target/ppc/translate.c > @@ -1820,7 +1820,7 @@ static inline void gen_op_arith_divd(DisasContext *ctx, TCGv ret, > tcg_gen_or_tl(cpu_so, cpu_so, cpu_ov); > } > > - if (unlikely(Rc(ctx->opcode) != 0)) { > + if (unlikely(compute_rc0)) { > gen_set_Rc0(ctx, ret); > } > }
On Tue, 2024-11-05 at 18:33 +0300, Michael Tokarev wrote: > 04.11.2024 03:17, Nicholas Piggin wrote: > > From: Ilya Leoshkevich <iii@linux.ibm.com> > > > > This is like commit 86e6202a57b1 ("target/ppc: Make divw[u] handler > > method decodetree compatible."), but for gen_op_arith_divd(). > > 86e6202a57b1 is v9.0.0-880-g86e6202a57b1, ie, it is in 9.1 only. > So I wonder what should we do for older stable series (namely for > 8.2 lts and 9.0), -- should we pick this one together with the > mentioned 86e6202a57b1, or neither? > > A separate question is whenever it makes sense to pick these for 7.2? > > Thanks, > > /mjt Come to think of it, I would recommend only the previous commit ("target/ppc: Set ctx->opcode for decode_insn32()") for stable. It solves the whole class of potential problems like this one, and it should apply to 7.2 as well. The reason we also have this fix in the pull request is that long-term the ctx->opcode field will be removed. [...]
05.11.2024 21:01, Ilya Leoshkevich wrote: > On Tue, 2024-11-05 at 18:33 +0300, Michael Tokarev wrote: >> 04.11.2024 03:17, Nicholas Piggin wrote: >>> From: Ilya Leoshkevich <iii@linux.ibm.com> >>> >>> This is like commit 86e6202a57b1 ("target/ppc: Make divw[u] handler >>> method decodetree compatible."), but for gen_op_arith_divd(). ... > Come to think of it, I would recommend only the previous commit > ("target/ppc: Set ctx->opcode for decode_insn32()") for stable. It > solves the whole class of potential problems like this one, and it > should apply to 7.2 as well. Yes, "Set ctx->opcode for decode_insn32()" applies and works for all older stable releases. So I'm not picking up this commit ("Make divd[u] handler method decodetree compatible") for the stable releases (not even for 9.1), and do not pick "Make divw[u] handler" either. The rest from this pull request which are marked for-stable, are picked up. > The reason we also have this fix in the pull request is that long-term > the ctx->opcode field will be removed. Thank you for the clarification! /mjt
diff --git a/target/ppc/translate.c b/target/ppc/translate.c index be93777cf6..47ca50a064 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -1820,7 +1820,7 @@ static inline void gen_op_arith_divd(DisasContext *ctx, TCGv ret, tcg_gen_or_tl(cpu_so, cpu_so, cpu_ov); } - if (unlikely(Rc(ctx->opcode) != 0)) { + if (unlikely(compute_rc0)) { gen_set_Rc0(ctx, ret); } }