summaryrefslogtreecommitdiffstats
path: root/exec-arm.h
diff options
context:
space:
mode:
Diffstat (limited to 'exec-arm.h')
-rw-r--r--exec-arm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/exec-arm.h b/exec-arm.h
index 8da263672b..e838e88239 100644
--- a/exec-arm.h
+++ b/exec-arm.h
@@ -30,3 +30,11 @@ register uint32_t T2 asm(AREG3);
void cpu_lock(void);
void cpu_unlock(void);
void cpu_loop_exit(void);
+
+static inline int compute_cpsr(void)
+{
+ int ZF;
+ ZF = (env->NZF == 0);
+ return env->cpsr | (env->NZF & 0x80000000) | (ZF << 30) |
+ (env->CF << 29) | ((env->VF & 0x80000000) >> 3);
+}