x86: avoid AREG0 for condition code helpers

Add an explicit CPUX86State parameter instead of relying on AREG0.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Blue Swirl 2012-04-29 12:45:34 +00:00
parent d3eb5eaeb5
commit f0967a1add
10 changed files with 179 additions and 169 deletions

View file

@ -44,7 +44,7 @@ void helper_cmpxchg8b(target_ulong a0)
uint64_t d;
int eflags;
eflags = helper_cc_compute_all(CC_OP);
eflags = cpu_cc_compute_all(env, CC_OP);
d = ldq(a0);
if (d == (((uint64_t)EDX << 32) | (uint32_t)EAX)) {
stq(a0, ((uint64_t)ECX << 32) | (uint32_t)EBX);
@ -68,7 +68,7 @@ void helper_cmpxchg16b(target_ulong a0)
if ((a0 & 0xf) != 0) {
raise_exception(env, EXCP0D_GPF);
}
eflags = helper_cc_compute_all(CC_OP);
eflags = cpu_cc_compute_all(env, CC_OP);
d0 = ldq(a0);
d1 = ldq(a0 + 8);
if (d0 == EAX && d1 == EDX) {