From fd39ec465bc654cd6de33ca77c1786e854c6a778 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Sat, 30 Jul 2016 13:21:44 +0800 Subject: [PATCH] arm: sync env.uc->thumb with env.thumb in arm_reg_write() --- qemu/target-arm/unicorn_arm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qemu/target-arm/unicorn_arm.c b/qemu/target-arm/unicorn_arm.c index e1e933e1..bdf2222c 100644 --- a/qemu/target-arm/unicorn_arm.c +++ b/qemu/target-arm/unicorn_arm.c @@ -108,6 +108,7 @@ int arm_reg_write(struct uc_struct *uc, unsigned int *regs, void* const* vals, i case UC_ARM_REG_R15: ARM_CPU(uc, mycpu)->env.pc = (*(uint32_t *)value & ~1); ARM_CPU(uc, mycpu)->env.thumb = (*(uint32_t *)value & 1); + ARM_CPU(uc, mycpu)->env.uc->thumb = (*(uint32_t *)value & 1); ARM_CPU(uc, mycpu)->env.regs[15] = (*(uint32_t *)value & ~1); // force to quit execution and flush TB uc->quit_request = true;