aboutsummaryrefslogtreecommitdiff
path: root/bsd-user/aarch64/target_arch_cpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'bsd-user/aarch64/target_arch_cpu.h')
-rw-r--r--bsd-user/aarch64/target_arch_cpu.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/bsd-user/aarch64/target_arch_cpu.h b/bsd-user/aarch64/target_arch_cpu.h
index 5c150bb7e9..b288e0d069 100644
--- a/bsd-user/aarch64/target_arch_cpu.h
+++ b/bsd-user/aarch64/target_arch_cpu.h
@@ -48,7 +48,6 @@ static inline void target_cpu_loop(CPUARMState *env)
CPUState *cs = env_cpu(env);
int trapnr, ec, fsc, si_code, si_signo;
uint64_t code, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8;
- uint32_t pstate;
abi_long ret;
for (;;) {
@@ -88,18 +87,16 @@ static inline void target_cpu_loop(CPUARMState *env)
* The carry bit is cleared for no error; set for error.
* See arm64/arm64/vm_machdep.c cpu_set_syscall_retval()
*/
- pstate = pstate_read(env);
if (ret >= 0) {
- pstate &= ~PSTATE_C;
+ env->CF = 0;
env->xregs[0] = ret;
} else if (ret == -TARGET_ERESTART) {
env->pc -= 4;
break;
} else if (ret != -TARGET_EJUSTRETURN) {
- pstate |= PSTATE_C;
+ env->CF = 1;
env->xregs[0] = -ret;
}
- pstate_write(env, pstate);
break;
case EXCP_INTERRUPT: