mirror of https://github.com/xemu-project/xemu.git
target/sparc: Introduce cpu_put_psr_icc
Isolate linux-user from changes to icc representation. Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
d762bf9793
commit
b1fa27fcc8
|
@ -164,7 +164,7 @@ static void restore_pt_regs(struct target_pt_regs *regs, CPUSPARCState *env)
|
||||||
*/
|
*/
|
||||||
uint32_t psr;
|
uint32_t psr;
|
||||||
__get_user(psr, ®s->psr);
|
__get_user(psr, ®s->psr);
|
||||||
env->psr = (psr & PSR_ICC) | (env->psr & ~PSR_ICC);
|
cpu_put_psr_icc(env, psr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Note that pc and npc are handled in the caller. */
|
/* Note that pc and npc are handled in the caller. */
|
||||||
|
|
|
@ -619,6 +619,7 @@ void sparc_restore_state_to_opc(CPUState *cs,
|
||||||
/* win_helper.c */
|
/* win_helper.c */
|
||||||
target_ulong cpu_get_psr(CPUSPARCState *env1);
|
target_ulong cpu_get_psr(CPUSPARCState *env1);
|
||||||
void cpu_put_psr(CPUSPARCState *env1, target_ulong val);
|
void cpu_put_psr(CPUSPARCState *env1, target_ulong val);
|
||||||
|
void cpu_put_psr_icc(CPUSPARCState *env1, target_ulong val);
|
||||||
void cpu_put_psr_raw(CPUSPARCState *env1, target_ulong val);
|
void cpu_put_psr_raw(CPUSPARCState *env1, target_ulong val);
|
||||||
#ifdef TARGET_SPARC64
|
#ifdef TARGET_SPARC64
|
||||||
void cpu_change_pstate(CPUSPARCState *env1, uint32_t new_pstate);
|
void cpu_change_pstate(CPUSPARCState *env1, uint32_t new_pstate);
|
||||||
|
|
|
@ -67,9 +67,14 @@ target_ulong cpu_get_psr(CPUSPARCState *env)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void cpu_put_psr_raw(CPUSPARCState *env, target_ulong val)
|
void cpu_put_psr_icc(CPUSPARCState *env, target_ulong val)
|
||||||
{
|
{
|
||||||
env->psr = val & PSR_ICC;
|
env->psr = val & PSR_ICC;
|
||||||
|
}
|
||||||
|
|
||||||
|
void cpu_put_psr_raw(CPUSPARCState *env, target_ulong val)
|
||||||
|
{
|
||||||
|
cpu_put_psr_icc(env, val);
|
||||||
#if !defined(TARGET_SPARC64)
|
#if !defined(TARGET_SPARC64)
|
||||||
env->psref = (val & PSR_EF) ? 1 : 0;
|
env->psref = (val & PSR_EF) ? 1 : 0;
|
||||||
env->psrpil = (val & PSR_PIL) >> 8;
|
env->psrpil = (val & PSR_PIL) >> 8;
|
||||||
|
|
Loading…
Reference in New Issue