aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/translate.c
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2017-09-20 17:30:14 +0200
committerCornelia Huck <cohuck@redhat.com>2017-10-06 10:53:01 +0200
commit6b257354c4912d536b999ef32968b1cbb8add4f2 (patch)
tree459c71b17c0dbf4adc3379f51f30efa3d452875a /target/s390x/translate.c
parentd8f932cc696250cb740240d668b39df5fbb2d5a0 (diff)
downloadqemu-6b257354c4912d536b999ef32968b1cbb8add4f2.zip
qemu-6b257354c4912d536b999ef32968b1cbb8add4f2.tar.gz
qemu-6b257354c4912d536b999ef32968b1cbb8add4f2.tar.bz2
s390x/tcg: implement spm (SET PROGRAM MASK)
Missing and is used inside Linux in the context of CPACF. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20170920153016.3858-2-david@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
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 5abd34f..59fde44 100644
--- a/target/s390x/translate.c
+++ b/target/s390x/translate.c
@@ -3796,6 +3796,17 @@ static ExitStatus op_srnm(DisasContext *s, DisasOps *o)
return NO_EXIT;
}
+static ExitStatus op_spm(DisasContext *s, DisasOps *o)
+{
+ tcg_gen_extrl_i64_i32(cc_op, o->in1);
+ tcg_gen_extract_i32(cc_op, cc_op, 28, 2);
+ set_cc_static(s);
+
+ tcg_gen_shri_i64(o->in1, o->in1, 24);
+ tcg_gen_deposit_i64(psw_mask, psw_mask, o->in1, PSW_SHIFT_MASK_PM, 4);
+ return NO_EXIT;
+}
+
#ifndef CONFIG_USER_ONLY
static ExitStatus op_spka(DisasContext *s, DisasOps *o)
{