summaryrefslogtreecommitdiff
path: root/tcg-runtime.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2016-09-02 12:23:57 -0700
committerRichard Henderson <rth@twiddle.net>2016-10-26 08:29:01 -0700
commitdf79b996a7b21c6ea7847f7927a2e1a294b86c72 (patch)
tree878779e7214c310b0b0929ca115e286a9f0ba12f /tcg-runtime.c
parent7ebee43ee3e2fcd7b5063058b7ef74bc43216733 (diff)
downloadqemu-df79b996a7b21c6ea7847f7927a2e1a294b86c72.tar.gz
tcg: Add CONFIG_ATOMIC64
Allow qemu to build on 32-bit hosts without 64-bit atomic ops. Even if we only allow 32-bit hosts to multi-thread emulate 32-bit guests, we still need some way to handle the 32-bit guest using a 64-bit atomic operation. Do so by dropping back to single-step. 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 'tcg-runtime.c')
-rw-r--r--tcg-runtime.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tcg-runtime.c b/tcg-runtime.c
index e9521531cd..9327b6f23b 100644
--- a/tcg-runtime.c
+++ b/tcg-runtime.c
@@ -101,6 +101,11 @@ int64_t HELPER(mulsh_i64)(int64_t arg1, int64_t arg2)
return h;
}
+void HELPER(exit_atomic)(CPUArchState *env)
+{
+ cpu_loop_exit_atomic(ENV_GET_CPU(env), GETPC());
+}
+
#ifndef CONFIG_SOFTMMU
/* The softmmu versions of these helpers are in cputlb.c. */
@@ -130,8 +135,10 @@ static void *atomic_mmu_lookup(CPUArchState *env, target_ulong addr,
#define DATA_SIZE 4
#include "atomic_template.h"
+#ifdef CONFIG_ATOMIC64
#define DATA_SIZE 8
#include "atomic_template.h"
+#endif
/* The following is only callable from other helpers, and matches up
with the softmmu version. */