Re: [PATCH v2 4/4] linux-user/sparc: Handle tstate in sparc64_get/set_context()

2020-12-17 Thread Laurent Vivier
Le 06/11/2020 à 16:27, Peter Maydell a écrit : > Correctly implement save/restore of the tstate field in > sparc64_get_context() and sparc64_set_context(): > * Don't use the CWP value from the guest in set_context > * Construct and save a tstate value rather than leaving >it as zero in get_co

Re: [PATCH v2 4/4] linux-user/sparc: Handle tstate in sparc64_get/set_context()

2020-11-06 Thread Richard Henderson
On 11/6/20 7:27 AM, Peter Maydell wrote: > +#ifdef TARGET_SPARC64 > +/* win_helper.c */ > +target_ulong cpu_get_ccr(CPUSPARCState *env1); > +void cpu_put_ccr(CPUSPARCState *env1, target_ulong val); > +target_ulong cpu_get_cwp64(CPUSPARCState *env1); > +void cpu_put_cwp64(CPUSPARCState *env1, int cw

[PATCH v2 4/4] linux-user/sparc: Handle tstate in sparc64_get/set_context()

2020-11-06 Thread Peter Maydell
Correctly implement save/restore of the tstate field in sparc64_get_context() and sparc64_set_context(): * Don't use the CWP value from the guest in set_context * Construct and save a tstate value rather than leaving it as zero in get_context To do this we factor out the "calculate TSTATE val