summaryrefslogtreecommitdiffstats
path: root/cputlb.c
diff options
context:
space:
mode:
authorRichard Henderson2016-06-30 06:10:59 +0200
committerRichard Henderson2016-10-26 17:29:01 +0200
commit7ebee43ee3e2fcd7b5063058b7ef74bc43216733 (patch)
tree366db1d66ff70d8332b6fb38b07085a0f79c6293 /cputlb.c
parenttcg: Add atomic helpers (diff)
downloadqemu-7ebee43ee3e2fcd7b5063058b7ef74bc43216733.tar.gz
qemu-7ebee43ee3e2fcd7b5063058b7ef74bc43216733.tar.xz
qemu-7ebee43ee3e2fcd7b5063058b7ef74bc43216733.zip
tcg: Add atomic128 helpers
Force the use of cmpxchg16b on x86_64. Wikipedia suggests that only very old AMD64 (circa 2004) did not have this instruction. Further, it's required by Windows 8 so no new cpus will ever omit it. If we truely care about these, then we could check this at startup time and then avoid executing paths that use it. Reviewed-by: Emilio G. Cota <cota@braap.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'cputlb.c')
-rw-r--r--cputlb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cputlb.c b/cputlb.c
index 4f2c5002f6..845b2a7acf 100644
--- a/cputlb.c
+++ b/cputlb.c
@@ -690,6 +690,11 @@ static void *atomic_mmu_lookup(CPUArchState *env, target_ulong addr,
#define DATA_SIZE 8
#include "atomic_template.h"
+#ifdef CONFIG_ATOMIC128
+#define DATA_SIZE 16
+#include "atomic_template.h"
+#endif
+
/* Second set of helpers are directly callable from TCG as helpers. */
#undef EXTRA_ARGS