From a24e53d7944110f8a3010436dc0b5bc79cc9776c Mon Sep 17 00:00:00 2001 From: mio Date: Sun, 14 May 2023 13:35:10 +0200 Subject: [PATCH] Rebuild flags after writing to cp registers This is buggy as this momemt per https://github.com/unicorn-engine/unicorn/issues/1789#issuecomment-1546807410 We need either doc this or save more information for a context --- qemu/target/arm/unicorn_aarch64.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qemu/target/arm/unicorn_aarch64.c b/qemu/target/arm/unicorn_aarch64.c index fa40330f..e3bc63a3 100644 --- a/qemu/target/arm/unicorn_aarch64.c +++ b/qemu/target/arm/unicorn_aarch64.c @@ -323,6 +323,7 @@ static uc_err reg_write(CPUARMState *env, unsigned int regid, const void *value) break; case UC_ARM64_REG_CP_REG: ret = write_cp_reg(env, (uc_arm64_cp_reg *)value); + arm_rebuild_hflags(env); break; case UC_ARM64_REG_FPCR: vfp_set_fpcr(env, *(uint32_t *)value);