diff options
author | liguang | 2013-05-28 10:21:02 +0200 |
---|---|---|
committer | Blue Swirl | 2013-06-15 19:49:10 +0200 |
commit | 00f5e6f21ea55046173a8a106b7654036888e9b3 (patch) | |
tree | bb329a18bc4e8d3dba5889e1cdc9adcef7fedfad /target-i386/mem_helper.c | |
parent | target-i386/helper: remove ECX macro (diff) | |
download | qemu-00f5e6f21ea55046173a8a106b7654036888e9b3.tar.gz qemu-00f5e6f21ea55046173a8a106b7654036888e9b3.tar.xz qemu-00f5e6f21ea55046173a8a106b7654036888e9b3.zip |
target-i386/helper: remove EDX 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.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/target-i386/mem_helper.c b/target-i386/mem_helper.c index 41ac8477b9..319a219f8a 100644 --- a/target-i386/mem_helper.c +++ b/target-i386/mem_helper.c @@ -45,13 +45,13 @@ 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])) { + if (d == (((uint64_t)env->regs[R_EDX] << 32) | (uint32_t)env->regs[R_EAX])) { 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 */ cpu_stq_data(env, a0, d); - EDX = (uint32_t)(d >> 32); + env->regs[R_EDX] = (uint32_t)(d >> 32); env->regs[R_EAX] = (uint32_t)d; eflags &= ~CC_Z; } @@ -70,7 +70,7 @@ void helper_cmpxchg16b(CPUX86State *env, target_ulong a0) eflags = cpu_cc_compute_all(env, CC_OP); d0 = cpu_ldq_data(env, a0); d1 = cpu_ldq_data(env, a0 + 8); - if (d0 == env->regs[R_EAX] && d1 == EDX) { + if (d0 == env->regs[R_EAX] && d1 == env->regs[R_EDX]) { cpu_stq_data(env, a0, env->regs[R_EBX]); cpu_stq_data(env, a0 + 8, env->regs[R_ECX]); eflags |= CC_Z; @@ -78,7 +78,7 @@ void helper_cmpxchg16b(CPUX86State *env, target_ulong a0) /* always do the store */ cpu_stq_data(env, a0, d0); cpu_stq_data(env, a0 + 8, d1); - EDX = d1; + env->regs[R_EDX] = d1; env->regs[R_EAX] = d0; eflags &= ~CC_Z; } |