From patchwork Fri Sep 28 00:50:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 187640 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 753702C00A9 for ; Fri, 28 Sep 2012 10:51:03 +1000 (EST) Received: from localhost ([::1]:54030 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THOnF-0002Ln-M4 for incoming@patchwork.ozlabs.org; Thu, 27 Sep 2012 20:51:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56896) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THOn9-0002LV-4S for qemu-devel@nongnu.org; Thu, 27 Sep 2012 20:50:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1THOn7-0004Qo-PV for qemu-devel@nongnu.org; Thu, 27 Sep 2012 20:50:54 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:59692) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THOn7-0004Qk-IM for qemu-devel@nongnu.org; Thu, 27 Sep 2012 20:50:53 -0400 Received: by pbbrp2 with SMTP id rp2so4377686pbb.4 for ; Thu, 27 Sep 2012 17:50:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=osnnZzGdTuiTq0bpCtt+PRbCVlTrZ8Ska64VI0fnIKk=; b=k1E7uzDMkVocAa8syC14o6jiaszI5H9h1yNgGDRpo4AApgBCTnqe2/qunwzKR5zCI2 Sc8N6+tbCnMLgC3uh2T0gerJ3uA5HNiG0EoepDlMf4Fh6QlE0Q3PlvzweZN6YyGlWL9r jmsWL6I3e9ez84zNROt7dh9SHwywdb+lLaq2nhb4kaynvDJN0vkt+nWQ4B7hDVoFLGxh vIHGx4fIiQdTUekVBa2GIwM8jirZQkgBYMHIIMkB/nqW/CJus1frpcqDeJNGUnlgU1tW 2of3ZjcyspCq0aPcDpd+cZs201stXz504rAbBO1439fMyWY3FQHICkVZfPn0UaOaNKIv MtRg== Received: by 10.68.196.169 with SMTP id in9mr15985016pbc.70.1348793452790; Thu, 27 Sep 2012 17:50:52 -0700 (PDT) Received: from anchor.twiddle.home.com ([173.160.232.49]) by mx.google.com with ESMTPS id qd9sm4641506pbb.31.2012.09.27.17.50.51 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 27 Sep 2012 17:50:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 27 Sep 2012 17:50:49 -0700 Message-Id: <1348793449-27657-1-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.11.4 In-Reply-To: <1348785610-23418-1-git-send-email-rth@twiddle.net> References: <1348785610-23418-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.45 Cc: Alexander Graf Subject: [Qemu-devel] [PATCH 115/147] target-s390: Convert LPSWE X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Richard Henderson --- target-s390x/insn-data.def | 2 ++ target-s390x/translate.c | 37 ++++++++++++++++++------------------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/target-s390x/insn-data.def b/target-s390x/insn-data.def index ba070f1..b0cf908 100644 --- a/target-s390x/insn-data.def +++ b/target-s390x/insn-data.def @@ -627,6 +627,8 @@ C(0xeb2f, LCTLG, RSY_a, Z, 0, a2, 0, 0, lctlg, 0) /* LOAD PSW */ C(0x8200, LPSW, S, Z, 0, a2, 0, 0, lpsw, 0) +/* LOAD PSW EXTENDED */ + C(0xb2b2, LPSWE, S, Z, 0, a2, 0, 0, lpswe, 0) /* LOAD REAL ADDRESS */ C(0xb100, LRA, RX_a, Z, 0, a2, r1, 0, lra, 0) C(0xe313, LRAY, RXY_a, LD, 0, a2, r1, 0, lra, 0) diff --git a/target-s390x/translate.c b/target-s390x/translate.c index 63d4be6..61bac81 100644 --- a/target-s390x/translate.c +++ b/target-s390x/translate.c @@ -1022,10 +1022,9 @@ static void disas_b2(CPUS390XState *env, DisasContext *s, int op, uint32_t insn) { #ifndef CONFIG_USER_ONLY - TCGv_i64 tmp, tmp2, tmp3; + TCGv_i64 tmp; TCGv_i32 tmp32_1; int r1, r2; - int r3, d2, b2; r1 = (insn >> 4) & 0xf; r2 = insn & 0xf; @@ -1033,23 +1032,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 0xb2: /* LPSWE D2(B2) [S] */ - /* Load PSW Extended */ - check_privileged(s); - decode_rs(s, insn, &r1, &r3, &b2, &d2); - tmp = get_address(s, 0, b2, d2); - tmp2 = tcg_temp_new_i64(); - tmp3 = tcg_temp_new_i64(); - tcg_gen_qemu_ld64(tmp2, tmp, get_mem_index(s)); - tcg_gen_addi_i64(tmp, tmp, 8); - tcg_gen_qemu_ld64(tmp3, tmp, get_mem_index(s)); - gen_helper_load_psw(cpu_env, tmp2, tmp3); - /* we need to keep cc_op intact */ - s->is_jmp = DISAS_JUMP; - tcg_temp_free_i64(tmp); - tcg_temp_free_i64(tmp2); - tcg_temp_free_i64(tmp3); - break; case 0x20: /* SERVC R1,R2 [RRE] */ /* SCLP Service call (PV hypercall) */ check_privileged(s); @@ -2254,6 +2236,23 @@ static ExitStatus op_lpsw(DisasContext *s, DisasOps *o) tcg_temp_free_i64(t2); return EXIT_NORETURN; } + +static ExitStatus op_lpswe(DisasContext *s, DisasOps *o) +{ + TCGv_i64 t1, t2; + + check_privileged(s); + + t1 = tcg_temp_new_i64(); + t2 = tcg_temp_new_i64(); + tcg_gen_qemu_ld64(t1, o->in2, get_mem_index(s)); + tcg_gen_addi_i64(o->in2, o->in2, 8); + tcg_gen_qemu_ld64(t2, o->in2, get_mem_index(s)); + gen_helper_load_psw(cpu_env, t1, t2); + tcg_temp_free_i64(t1); + tcg_temp_free_i64(t2); + return EXIT_NORETURN; +} #endif static ExitStatus op_lam(DisasContext *s, DisasOps *o)