diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2023-10-14 14:01:08 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-11-05 11:52:18 -0800 |
commit | b1fa27fcc88428f79de772825ab50cfca14bfc5f (patch) | |
tree | 42bec99e7e2c1628ae4ef0d243fe6d38eee1f409 /target/sparc | |
parent | d762bf97931b58839316b68a570eecc6143c9e3e (diff) | |
download | qemu-b1fa27fcc88428f79de772825ab50cfca14bfc5f.zip qemu-b1fa27fcc88428f79de772825ab50cfca14bfc5f.tar.gz qemu-b1fa27fcc88428f79de772825ab50cfca14bfc5f.tar.bz2 |
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>
Diffstat (limited to 'target/sparc')
-rw-r--r-- | target/sparc/cpu.h | 1 | ||||
-rw-r--r-- | target/sparc/win_helper.c | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index 758a4e8..955329f 100644 --- a/target/sparc/cpu.h +++ b/target/sparc/cpu.h @@ -619,6 +619,7 @@ void sparc_restore_state_to_opc(CPUState *cs, /* win_helper.c */ target_ulong cpu_get_psr(CPUSPARCState *env1); 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); #ifdef TARGET_SPARC64 void cpu_change_pstate(CPUSPARCState *env1, uint32_t new_pstate); diff --git a/target/sparc/win_helper.c b/target/sparc/win_helper.c index 3a7c0ff..bf2c90c 100644 --- a/target/sparc/win_helper.c +++ b/target/sparc/win_helper.c @@ -67,9 +67,14 @@ target_ulong cpu_get_psr(CPUSPARCState *env) #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; +} + +void cpu_put_psr_raw(CPUSPARCState *env, target_ulong val) +{ + cpu_put_psr_icc(env, val); #if !defined(TARGET_SPARC64) env->psref = (val & PSR_EF) ? 1 : 0; env->psrpil = (val & PSR_PIL) >> 8; |