summaryrefslogtreecommitdiffstats
path: root/target-s390x/translate.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2013-09-06 09:48:08 -0700
committerRichard Henderson <rth@twiddle.net>2015-02-03 12:06:37 -0800
commite30a9d3fea58c356000ce328421fe65e03143bb1 (patch)
tree8e91b4d35f39409b2051f012f267702eb46f3ffd /target-s390x/translate.c
parent8612c935831647c193281992738f96292428b9e6 (diff)
downloadhqemu-e30a9d3fea58c356000ce328421fe65e03143bb1.zip
hqemu-e30a9d3fea58c356000ce328421fe65e03143bb1.tar.gz
target-s390: Implement EPSW
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-s390x/translate.c')
-rw-r--r--target-s390x/translate.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/target-s390x/translate.c b/target-s390x/translate.c
index 1338bb5..97137c9 100644
--- a/target-s390x/translate.c
+++ b/target-s390x/translate.c
@@ -2051,6 +2051,24 @@ static ExitStatus op_efpc(DisasContext *s, DisasOps *o)
return NO_EXIT;
}
+static ExitStatus op_epsw(DisasContext *s, DisasOps *o)
+{
+ int r1 = get_field(s->fields, r1);
+ int r2 = get_field(s->fields, r2);
+ TCGv_i64 t = tcg_temp_new_i64();
+
+ /* Note the "subsequently" in the PoO, which implies a defined result
+ if r1 == r2. Thus we cannot defer these writes to an output hook. */
+ tcg_gen_shri_i64(t, psw_mask, 32);
+ store_reg32_i64(r1, t);
+ if (r2 != 0) {
+ store_reg32_i64(r2, psw_mask);
+ }
+
+ tcg_temp_free_i64(t);
+ return NO_EXIT;
+}
+
static ExitStatus op_ex(DisasContext *s, DisasOps *o)
{
/* ??? Perhaps a better way to implement EXECUTE is to set a bit in
OpenPOWER on IntegriCloud