On Thu, Sep 10, 2026 at 10:32 AM Brian Cain <[email protected]> wrote: > > Assign env->hvx to the right context when SSR:XA changes. > > Signed-off-by: Brian Cain <[email protected]> > --- > target/hexagon/cpu_helper.h | 1 + > target/hexagon/cpu.c | 5 +++ > target/hexagon/cpu_helper.c | 72 +++++++++++++++++++++++++++++++++++++ > target/hexagon/machine.c | 12 +++++++ > 4 files changed, 90 insertions(+) > > +static unsigned hexagon_hvx_context_index(HexagonCPU *cpu, uint8_t xa) > +{ > + unsigned n = hexagon_hvx_context_count(cpu); > + > + if (n == 0) { > + return 0; > + } > + return xa % n; > +}
Why is `xa` wrapped with `% n` instead of being used directly?
