From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41515) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THOl5-0000lR-Vn for qemu-devel@nongnu.org; Thu, 27 Sep 2012 20:48:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1THOl4-0003Rj-R4 for qemu-devel@nongnu.org; Thu, 27 Sep 2012 20:48:47 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:49401) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THOl4-0003RZ-KD for qemu-devel@nongnu.org; Thu, 27 Sep 2012 20:48:46 -0400 Received: by pbbrp2 with SMTP id rp2so4375781pbb.4 for ; Thu, 27 Sep 2012 17:48:45 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Thu, 27 Sep 2012 17:48:42 -0700 Message-Id: <1348793322-27572-1-git-send-email-rth@twiddle.net> In-Reply-To: <1348785610-23418-1-git-send-email-rth@twiddle.net> References: <1348785610-23418-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH 113/147] target-s390: Convert STSI List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexander Graf Signed-off-by: Richard Henderson --- target-s390x/helper.h | 2 +- target-s390x/insn-data.def | 2 ++ target-s390x/misc_helper.c | 4 ++-- target-s390x/translate.c | 24 ++++++++++-------------- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/target-s390x/helper.h b/target-s390x/helper.h index 4ba81af..55eaeea 100644 --- a/target-s390x/helper.h +++ b/target-s390x/helper.h @@ -91,7 +91,7 @@ DEF_HELPER_FLAGS_2(sckc, TCG_CALL_CONST, void, env, i64) DEF_HELPER_FLAGS_1(stckc, TCG_CALL_CONST, i64, env) DEF_HELPER_FLAGS_2(spt, TCG_CALL_CONST, void, env, i64) DEF_HELPER_FLAGS_1(stpt, TCG_CALL_CONST, i64, env) -DEF_HELPER_4(stsi, i32, env, i64, i32, i32) +DEF_HELPER_4(stsi, i32, env, i64, i64, i64) DEF_HELPER_4(lctl, void, env, i32, i64, i32) DEF_HELPER_4(lctlg, void, env, i32, i64, i32) DEF_HELPER_4(stctl, void, env, i32, i64, i32) diff --git a/target-s390x/insn-data.def b/target-s390x/insn-data.def index a389f15..5de3256 100644 --- a/target-s390x/insn-data.def +++ b/target-s390x/insn-data.def @@ -680,6 +680,8 @@ C(0xb209, STPT, S, Z, la2, 0, new, m1_64, stpt, 0) /* STORE PREFIX */ C(0xb211, STPX, S, Z, la2, 0, new, m1_32, stpx, 0) +/* STORE SYSTEM INFORMATION */ + C(0xb27d, STSI, S, Z, 0, a2, 0, 0, stsi, 0) /* STORE THEN AND SYSTEM MASK */ C(0xac00, STNSM, SI, Z, la1, 0, 0, 0, stnosm, 0) /* STORE THEN OR SYSTEM MASK */ diff --git a/target-s390x/misc_helper.c b/target-s390x/misc_helper.c index cf4ae62..b24e3d1 100644 --- a/target-s390x/misc_helper.c +++ b/target-s390x/misc_helper.c @@ -247,8 +247,8 @@ uint64_t HELPER(stpt)(CPUS390XState *env) } /* Store System Information */ -uint32_t HELPER(stsi)(CPUS390XState *env, uint64_t a0, uint32_t r0, - uint32_t r1) +uint32_t HELPER(stsi)(CPUS390XState *env, uint64_t a0, + uint64_t r0, uint64_t r1) { int cc = 0; int sel1, sel2; diff --git a/target-s390x/translate.c b/target-s390x/translate.c index b29e2ea..2bb6ac1 100644 --- a/target-s390x/translate.c +++ b/target-s390x/translate.c @@ -1023,7 +1023,7 @@ static void disas_b2(CPUS390XState *env, DisasContext *s, int op, { #ifndef CONFIG_USER_ONLY TCGv_i64 tmp, tmp2, tmp3; - TCGv_i32 tmp32_1, tmp32_2; + TCGv_i32 tmp32_1; int r1, r2; int r3, d2, b2; @@ -1033,19 +1033,6 @@ static void disas_b2(CPUS390XState *env, DisasContext *s, int op, LOG_DISAS("disas_b2: op 0x%x r1 %d r2 %d\n", op, r1, r2); switch (op) { - case 0x7d: /* STSI D2,(B2) [S] */ - check_privileged(s); - decode_rs(s, insn, &r1, &r3, &b2, &d2); - tmp = get_address(s, 0, b2, d2); - tmp32_1 = load_reg32(0); - tmp32_2 = load_reg32(1); - potential_page_fault(s); - gen_helper_stsi(cc_op, cpu_env, tmp, tmp32_1, tmp32_2); - set_cc_static(s); - tcg_temp_free_i64(tmp); - tcg_temp_free_i32(tmp32_1); - tcg_temp_free_i32(tmp32_2); - break; case 0xb1: /* STFL D2(B2) [S] */ /* Store Facility List (CPU features) at 200 */ check_privileged(s); @@ -2895,6 +2882,15 @@ static ExitStatus op_stpt(DisasContext *s, DisasOps *o) return NO_EXIT; } +static ExitStatus op_stsi(DisasContext *s, DisasOps *o) +{ + check_privileged(s); + potential_page_fault(s); + gen_helper_stsi(cc_op, cpu_env, o->in2, regs[0], regs[1]); + set_cc_static(s); + return NO_EXIT; +} + static ExitStatus op_spx(DisasContext *s, DisasOps *o) { check_privileged(s); -- 1.7.11.4