mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
target-i386/helper: remove EAX 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>
This commit is contained in:
parent
371a775dc1
commit
4b34e3ad83
7 changed files with 60 additions and 62 deletions
|
@ -45,14 +45,14 @@ 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)EAX)) {
|
||||
if (d == (((uint64_t)EDX << 32) | (uint32_t)env->regs[R_EAX])) {
|
||||
cpu_stq_data(env, a0, ((uint64_t)ECX << 32) | (uint32_t)EBX);
|
||||
eflags |= CC_Z;
|
||||
} else {
|
||||
/* always do the store */
|
||||
cpu_stq_data(env, a0, d);
|
||||
EDX = (uint32_t)(d >> 32);
|
||||
EAX = (uint32_t)d;
|
||||
env->regs[R_EAX] = (uint32_t)d;
|
||||
eflags &= ~CC_Z;
|
||||
}
|
||||
CC_SRC = eflags;
|
||||
|
@ -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 == EAX && d1 == EDX) {
|
||||
if (d0 == env->regs[R_EAX] && d1 == EDX) {
|
||||
cpu_stq_data(env, a0, EBX);
|
||||
cpu_stq_data(env, a0 + 8, ECX);
|
||||
eflags |= CC_Z;
|
||||
|
@ -79,7 +79,7 @@ void helper_cmpxchg16b(CPUX86State *env, target_ulong a0)
|
|||
cpu_stq_data(env, a0, d0);
|
||||
cpu_stq_data(env, a0 + 8, d1);
|
||||
EDX = d1;
|
||||
EAX = d0;
|
||||
env->regs[R_EAX] = d0;
|
||||
eflags &= ~CC_Z;
|
||||
}
|
||||
CC_SRC = eflags;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue