summaryrefslogtreecommitdiff
path: root/target-s390x/translate.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-s390x/translate.c')
-rw-r--r--target-s390x/translate.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/target-s390x/translate.c b/target-s390x/translate.c
index 0cb036f667..dbf1993d46 100644
--- a/target-s390x/translate.c
+++ b/target-s390x/translate.c
@@ -2925,6 +2925,18 @@ static ExitStatus op_sacf(DisasContext *s, DisasOps *o)
/* Addressing mode has changed, so end the block. */
return EXIT_PC_STALE;
}
+
+static ExitStatus op_sam(DisasContext *s, DisasOps *o)
+{
+ int sam = s->insn->data;
+ TCGv_i64 tsam = tcg_const_i64(sam);
+
+ /* Overwrite PSW_MASK_64 and PSW_MASK_32 */
+ tcg_gen_deposit_i64(psw_mask, psw_mask, tsam, 31, 2);
+
+ tcg_temp_free_i64(tsam);
+ return EXIT_PC_STALE;
+}
#endif
static ExitStatus op_sar(DisasContext *s, DisasOps *o)