From 75e5fb466c38a0cc83dbc3826af34ee4d34477f7 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Mon, 14 Mar 2016 09:27:46 +0800 Subject: [PATCH] x86: fix writing to UC_X86_REG_FPCW --- qemu/target-i386/unicorn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/target-i386/unicorn.c b/qemu/target-i386/unicorn.c index 106266f3..a3ccfe8c 100644 --- a/qemu/target-i386/unicorn.c +++ b/qemu/target-i386/unicorn.c @@ -642,7 +642,7 @@ int x86_reg_write(struct uc_struct *uc, unsigned int regid, const void *value) } break; case UC_X86_REG_FPCW: - *(uint16_t*) value = X86_CPU(uc, mycpu)->env.fpuc; + X86_CPU(uc, mycpu)->env.fpuc = *(uint16_t *)value; break; case UC_X86_REG_FPTAG: {