aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/translate.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2017-05-18 19:26:40 +0200
committerRichard Henderson <rth@twiddle.net>2017-06-06 14:34:31 -0700
commitf79f1ca4a20d4070179903bbaafc13f5f90b7873 (patch)
tree5921a73bc3333cde97f964bda0daab4999789405 /target/s390x/translate.c
parent65dfad62a176f5265f801683be64149c5ad55f7d (diff)
target/s390x: Add support for the TEST BLOCK instruction
TEST BLOCK was likely once used to execute basic memory tests, but nowadays it's just a (slow) way to clear a page. Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1495128400-23759-1-git-send-email-thuth@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target/s390x/translate.c')
-rw-r--r--target/s390x/translate.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/target/s390x/translate.c b/target/s390x/translate.c
index 628fb8685d..837d90cd07 100644
--- a/target/s390x/translate.c
+++ b/target/s390x/translate.c
@@ -4062,6 +4062,16 @@ static ExitStatus op_tcxb(DisasContext *s, DisasOps *o)
}
#ifndef CONFIG_USER_ONLY
+
+static ExitStatus op_testblock(DisasContext *s, DisasOps *o)
+{
+ check_privileged(s);
+ potential_page_fault(s);
+ gen_helper_testblock(cc_op, cpu_env, o->in2);
+ set_cc_static(s);
+ return NO_EXIT;
+}
+
static ExitStatus op_tprot(DisasContext *s, DisasOps *o)
{
potential_page_fault(s);
@@ -4069,6 +4079,7 @@ static ExitStatus op_tprot(DisasContext *s, DisasOps *o)
set_cc_static(s);
return NO_EXIT;
}
+
#endif
static ExitStatus op_tr(DisasContext *s, DisasOps *o)