Re: [PATCH for-8.0] target/arm: Fix generated code for cpreg reads when HSTR is active

2023-03-28 Thread Richard Henderson
On 3/28/23 11:27, Peter Maydell wrote: On Tue, 28 Mar 2023 at 18:27, Richard Henderson wrote: On 3/28/23 09:28, Peter Maydell wrote: +/* + * gen_exception_insn() will set is_jmp to DISAS_NORETURN, + * but since we're conditionally branching over it, we want

Re: [PATCH for-8.0] target/arm: Fix generated code for cpreg reads when HSTR is active

2023-03-28 Thread Richard Henderson
On 3/28/23 11:27, Peter Maydell wrote: On Tue, 28 Mar 2023 at 18:27, Richard Henderson wrote: On 3/28/23 09:28, Peter Maydell wrote: +/* + * gen_exception_insn() will set is_jmp to DISAS_NORETURN, + * but since we're conditionally branching over it, we want

Re: [PATCH for-8.0] target/arm: Fix generated code for cpreg reads when HSTR is active

2023-03-28 Thread Peter Maydell
On Tue, 28 Mar 2023 at 18:27, Richard Henderson wrote: > > On 3/28/23 09:28, Peter Maydell wrote: > > +/* > > + * gen_exception_insn() will set is_jmp to DISAS_NORETURN, > > + * but since we're conditionally branching over it, we want > > + * to reta

Re: [PATCH for-8.0] target/arm: Fix generated code for cpreg reads when HSTR is active

2023-03-28 Thread Richard Henderson
On 3/28/23 09:28, Peter Maydell wrote: +/* + * gen_exception_insn() will set is_jmp to DISAS_NORETURN, + * but since we're conditionally branching over it, we want + * to retain the existing value. + */ +old_is_jmp = s->base.

Re: [PATCH for-8.0] target/arm: Fix generated code for cpreg reads when HSTR is active

2023-03-28 Thread Richard Henderson
On 3/28/23 09:28, Peter Maydell wrote: In commit 049edada we added some code to handle HSTR_EL2 traps, which we did as an inline "conditionally branch over a gen_exception_insn()". Unfortunately this fails to take account of the fact that gen_exception_insn() will set s->base.is_jmp to DISAS_NOR

[PATCH for-8.0] target/arm: Fix generated code for cpreg reads when HSTR is active

2023-03-28 Thread Peter Maydell
In commit 049edada we added some code to handle HSTR_EL2 traps, which we did as an inline "conditionally branch over a gen_exception_insn()". Unfortunately this fails to take account of the fact that gen_exception_insn() will set s->base.is_jmp to DISAS_NORETURN. That means that at the end of the