diff options
| author | Richard Henderson <richard.henderson@linaro.org> | 2023-10-14 18:24:19 -0700 |
|---|---|---|
| committer | Richard Henderson <richard.henderson@linaro.org> | 2023-11-05 11:53:13 -0800 |
| commit | 2a1905c79e1009600e96e7d1d0c592d573e94dbd (patch) | |
| tree | 681d8dc486672ac158a19919b5bef4f62069abad /linux-user/sparc/cpu_loop.c | |
| parent | b1fa27fcc88428f79de772825ab50cfca14bfc5f (diff) | |
| download | focaccia-qemu-2a1905c79e1009600e96e7d1d0c592d573e94dbd.tar.gz focaccia-qemu-2a1905c79e1009600e96e7d1d0c592d573e94dbd.zip | |
target/sparc: Split psr and xcc into components
Step in removing CC_OP: change the representation of CC_OP_FLAGS. The 8 bits are distributed between 6 variables, which should make it easy to keep up to date. The code within cc_helper.c is quite ugly but is only temporary. 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 'linux-user/sparc/cpu_loop.c')
| -rw-r--r-- | linux-user/sparc/cpu_loop.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c index b36bb2574b..c1a2362041 100644 --- a/linux-user/sparc/cpu_loop.c +++ b/linux-user/sparc/cpu_loop.c @@ -197,10 +197,8 @@ static uint32_t do_getpsr(CPUSPARCState *env) /* Avoid ifdefs below for the abi32 and abi64 paths. */ #ifdef TARGET_ABI32 #define TARGET_TT_SYSCALL (TT_TRAP + 0x10) /* t_linux */ -#define syscall_cc psr #else #define TARGET_TT_SYSCALL (TT_TRAP + 0x6d) /* tl0_linux64 */ -#define syscall_cc xcc #endif /* Avoid ifdefs below for the v9 and pre-v9 hw traps. */ @@ -240,10 +238,10 @@ void cpu_loop (CPUSPARCState *env) break; } if ((abi_ulong)ret >= (abi_ulong)(-515)) { - env->syscall_cc |= PSR_CARRY; + set_syscall_C(env, 1); ret = -ret; } else { - env->syscall_cc &= ~PSR_CARRY; + set_syscall_C(env, 0); } env->regwptr[0] = ret; /* next instruction */ |