Re: [PATCH v2 1/4] linux-user/sparc: Correct sparc64_get/set_context() FPU handling

2020-12-17 Thread Laurent Vivier
Le 06/11/2020 à 18:09, Richard Henderson a écrit : > On 11/6/20 7:27 AM, Peter Maydell wrote: >> +if (fprs & FPRS_DU) { >> +for (i = 16; i < 31; i++) { > > 32. > > Otherwise, > Reviewed-by: Richard Henderson > > r~ > Applied to my linux-user-for-6.0 branch with this change

Re: [PATCH v2 1/4] linux-user/sparc: Correct sparc64_get/set_context() FPU handling

2020-11-06 Thread Peter Maydell
On Fri, 6 Nov 2020 at 17:09, Richard Henderson wrote: > > On 11/6/20 7:27 AM, Peter Maydell wrote: > > +if (fprs & FPRS_DU) { > > +for (i = 16; i < 31; i++) { > > 32. Derp. Lucky this code basically never gets run, eh ? :-) -- PMM

Re: [PATCH v2 1/4] linux-user/sparc: Correct sparc64_get/set_context() FPU handling

2020-11-06 Thread Richard Henderson
On 11/6/20 7:27 AM, Peter Maydell wrote: > +if (fprs & FPRS_DU) { > +for (i = 16; i < 31; i++) { 32. Otherwise, Reviewed-by: Richard Henderson r~

[PATCH v2 1/4] linux-user/sparc: Correct sparc64_get/set_context() FPU handling

2020-11-06 Thread Peter Maydell
The handling of the FPU state in sparc64_get_context() and sparc64_set_context() is not the same as what the kernel actually does: we unconditionally read and write the FP registers and the FSR, GSR and FPRS, but the kernel logic is more complicated: * in get_context the kernel has code for saving