On 12/06/2019 20:47, Richard Henderson wrote: > On 6/2/19 4:08 AM, Mark Cave-Ayland wrote: >> - getVSR(xt_num, &xt, env); \ >> + \ >> nb = (nb >= 16) ? 16 : nb; \ >> if (msr_le && !lj) { \ >> for (i = 16; i > 16 - nb; i--) { \ >> - cpu_stb_data_ra(env, addr, xt.VsrB(i - 1), GETPC()); \ >> + cpu_stb_data_ra(env, addr, t.VsrB(i - 1), GETPC()); \ >> addr = addr_add(env, addr, 1); \ >> } \ >> } else { \ >> for (i = 0; i < nb; i++) { \ >> - cpu_stb_data_ra(env, addr, xt.VsrB(i), GETPC()); \ >> + cpu_stb_data_ra(env, addr, t.VsrB(i), GETPC()) ; \ >> addr = addr_add(env, addr, 1); \ >> } \ >> } \ >> + *xt = t; \ > > Do not write back stores.
Yeah, my mistake - David also managed to spot this one. > Actually, in this case there's no reason to copy t = *xt. Just store directly > from xt->VsrB(i). Okay I'll fix that in v3. ATB, Mark.