]> git.proxmox.com Git - mirror_qemu.git/commit
target-i386: emulate LOCK'ed cmpxchg using cmpxchg helpers
authorEmilio G. Cota <cota@braap.org>
Mon, 27 Jun 2016 19:01:51 +0000 (15:01 -0400)
committerRichard Henderson <rth@twiddle.net>
Wed, 26 Oct 2016 15:29:01 +0000 (08:29 -0700)
commitae03f8de45427042ecd10b0941a005f21ecc064c
treec3f96a2815553b63ed80dfae9d25ceaeab751d60
parent91682118aa330aff7e8ef0cc685c32d101f49940
target-i386: emulate LOCK'ed cmpxchg using cmpxchg helpers

The diff here is uglier than necessary. All this does is to turn

FOO

into:

if (s->prefix & PREFIX_LOCK) {
  BAR
} else {
  FOO
}

where FOO is the original implementation of an unlocked cmpxchg.

[rth: Adjust unlocked cmpxchg to use movcond instead of branches.
Adjust helpers to use atomic helpers.]

Signed-off-by: Emilio G. Cota <cota@braap.org>
Message-Id: <1467054136-10430-6-git-send-email-cota@braap.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
target-i386/helper.h
target-i386/mem_helper.c
target-i386/translate.c