summaryrefslogtreecommitdiffstats
path: root/target-i386/mem_helper.c
diff options
context:
space:
mode:
authorliguang2013-05-28 10:21:01 +0200
committerBlue Swirl2013-06-15 19:48:57 +0200
commita416561005da6e4f9903541486f53c2cbc3a428d (patch)
tree6b098a1000b2b9aeabe6cdc2654fedc889dc3780 /target-i386/mem_helper.c
parenttarget-i386/helper: remove EBX macro (diff)
downloadqemu-a416561005da6e4f9903541486f53c2cbc3a428d.tar.gz
qemu-a416561005da6e4f9903541486f53c2cbc3a428d.tar.xz
qemu-a416561005da6e4f9903541486f53c2cbc3a428d.zip
target-i386/helper: remove ECX macro
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'target-i386/mem_helper.c')
-rw-r--r--target-i386/mem_helper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target-i386/mem_helper.c b/target-i386/mem_helper.c
index 6370fb5ebd..41ac8477b9 100644
--- a/target-i386/mem_helper.c
+++ b/target-i386/mem_helper.c
@@ -46,7 +46,7 @@ void helper_cmpxchg8b(CPUX86State *env, target_ulong a0)
eflags = cpu_cc_compute_all(env, CC_OP);
d = cpu_ldq_data(env, a0);
if (d == (((uint64_t)EDX << 32) | (uint32_t)env->regs[R_EAX])) {
- cpu_stq_data(env, a0, ((uint64_t)ECX << 32) | (uint32_t)env->regs[R_EBX]);
+ cpu_stq_data(env, a0, ((uint64_t)env->regs[R_ECX] << 32) | (uint32_t)env->regs[R_EBX]);
eflags |= CC_Z;
} else {
/* always do the store */
@@ -72,7 +72,7 @@ void helper_cmpxchg16b(CPUX86State *env, target_ulong a0)
d1 = cpu_ldq_data(env, a0 + 8);
if (d0 == env->regs[R_EAX] && d1 == EDX) {
cpu_stq_data(env, a0, env->regs[R_EBX]);
- cpu_stq_data(env, a0 + 8, ECX);
+ cpu_stq_data(env, a0 + 8, env->regs[R_ECX]);
eflags |= CC_Z;
} else {
/* always do the store */