|
@@ -48,7 +48,6 @@ static inline void target_cpu_loop(CPUARMState *env)
|
|
CPUState *cs = env_cpu(env);
|
|
CPUState *cs = env_cpu(env);
|
|
int trapnr, ec, fsc, si_code, si_signo;
|
|
int trapnr, ec, fsc, si_code, si_signo;
|
|
uint64_t code, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8;
|
|
uint64_t code, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8;
|
|
- uint32_t pstate;
|
|
|
|
abi_long ret;
|
|
abi_long ret;
|
|
|
|
|
|
for (;;) {
|
|
for (;;) {
|
|
@@ -88,18 +87,16 @@ static inline void target_cpu_loop(CPUARMState *env)
|
|
* The carry bit is cleared for no error; set for error.
|
|
* The carry bit is cleared for no error; set for error.
|
|
* See arm64/arm64/vm_machdep.c cpu_set_syscall_retval()
|
|
* See arm64/arm64/vm_machdep.c cpu_set_syscall_retval()
|
|
*/
|
|
*/
|
|
- pstate = pstate_read(env);
|
|
|
|
if (ret >= 0) {
|
|
if (ret >= 0) {
|
|
- pstate &= ~PSTATE_C;
|
|
|
|
|
|
+ env->CF = 0;
|
|
env->xregs[0] = ret;
|
|
env->xregs[0] = ret;
|
|
} else if (ret == -TARGET_ERESTART) {
|
|
} else if (ret == -TARGET_ERESTART) {
|
|
env->pc -= 4;
|
|
env->pc -= 4;
|
|
break;
|
|
break;
|
|
} else if (ret != -TARGET_EJUSTRETURN) {
|
|
} else if (ret != -TARGET_EJUSTRETURN) {
|
|
- pstate |= PSTATE_C;
|
|
|
|
|
|
+ env->CF = 1;
|
|
env->xregs[0] = -ret;
|
|
env->xregs[0] = -ret;
|
|
}
|
|
}
|
|
- pstate_write(env, pstate);
|
|
|
|
break;
|
|
break;
|
|
|
|
|
|
case EXCP_INTERRUPT:
|
|
case EXCP_INTERRUPT:
|