summaryrefslogtreecommitdiffstats
path: root/target/sh4/helper.h
diff options
context:
space:
mode:
authorRichard Henderson2017-07-18 22:02:31 +0200
committerAurelien Jarno2017-07-18 23:39:16 +0200
commit4bfa602bc2227f5b5a506a4c0c20657d68eaefd1 (patch)
tree4c74bbd8d12c615eb75beaf01938dc63ea01f1b3 /target/sh4/helper.h
parenttarget/sh4: Adjust TB_FLAG_PENDING_MOVCA (diff)
downloadqemu-4bfa602bc2227f5b5a506a4c0c20657d68eaefd1.tar.gz
qemu-4bfa602bc2227f5b5a506a4c0c20657d68eaefd1.tar.xz
qemu-4bfa602bc2227f5b5a506a4c0c20657d68eaefd1.zip
target/sh4: Handle user-space atomics
For uniprocessors, SH4 uses optimistic restartable atomic sequences. Upon an interrupt, a real kernel would simply notice magic values in the registers and reset the PC to the start of the sequence. For QEMU, we cannot do this in quite the same way. Instead, we notice the normal start of such a sequence (mov #-x,r15), and start a new TB that can be executed under cpu_exec_step_atomic. Reported-by: Bruno Haible <bruno@clisp.org> LP: https://bugs.launchpad.net/bugs/1701971 Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net> Message-Id: <20170718200255.31647-7-rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target/sh4/helper.h')
-rw-r--r--target/sh4/helper.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/target/sh4/helper.h b/target/sh4/helper.h
index 767a6d5209..6c6fa04732 100644
--- a/target/sh4/helper.h
+++ b/target/sh4/helper.h
@@ -6,6 +6,7 @@ DEF_HELPER_1(raise_slot_fpu_disable, noreturn, env)
DEF_HELPER_1(debug, noreturn, env)
DEF_HELPER_1(sleep, noreturn, env)
DEF_HELPER_2(trapa, noreturn, env, i32)
+DEF_HELPER_1(exclusive, noreturn, env)
DEF_HELPER_3(movcal, void, env, i32, i32)
DEF_HELPER_1(discard_movcal_backup, void, env)