From patchwork Sun Sep 9 21:05:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 182673 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 1EF8C2C00A0 for ; Mon, 10 Sep 2012 08:00:43 +1000 (EST) Received: from localhost ([::1]:55917 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAol6-0002Fd-4l for incoming@patchwork.ozlabs.org; Sun, 09 Sep 2012 17:09:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56775) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAoix-00087n-RS for qemu-devel@nongnu.org; Sun, 09 Sep 2012 17:07:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TAoiw-00066F-Po for qemu-devel@nongnu.org; Sun, 09 Sep 2012 17:07:23 -0400 Received: from mail-pz0-f45.google.com ([209.85.210.45]:63059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAoiw-0005pO-8g for qemu-devel@nongnu.org; Sun, 09 Sep 2012 17:07:22 -0400 Received: by mail-pz0-f45.google.com with SMTP id n15so968311dad.4 for ; Sun, 09 Sep 2012 14:07:22 -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=daUz0WLD4IDx/fE3nWa36gBzttK5cMLghcHf/+uTXhQ=; b=xld3eCzD69IjhYD+tglvcYnDa1d5cZNwxVZlqu4cxRYJsRPdWPGORrtg+7zXXQiBq+ NuADjbe+zXKCVj7zwZcflagU+RluqlCmFON+Nipga0evhFTulNlICf85rlqn5AXM+NI0 iv4MvcRvBNmVhBm9VnYT/S2HIKAKkbXjfpAPNhMmmOrAdP/64hOTUc/EcOl4y1+PiW41 h7/mHcRewfyK92MZKQBF+nvVeouK3mD6E9PcY6CKLC/bsN7LGiV6miDUZPZn0eCU0wW0 QW3YiMorkXwSw4hXkjUEYu25Exww0HV63K3XDo5jtawNijXPvXGe4Fu3GICfXzVPWDon f0Pw== Received: by 10.68.202.193 with SMTP id kk1mr2037929pbc.136.1347224842015; Sun, 09 Sep 2012 14:07:22 -0700 (PDT) Received: from anchor.twiddle.home ([173.160.232.49]) by mx.google.com with ESMTPS id tw5sm662053pbc.48.2012.09.09.14.07.21 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 09 Sep 2012 14:07:21 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 9 Sep 2012 14:05:14 -0700 Message-Id: <1347224784-19472-57-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.11.4 In-Reply-To: <1347224784-19472-1-git-send-email-rth@twiddle.net> References: <1347224784-19472-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.210.45 Cc: Alexander Graf Subject: [Qemu-devel] [PATCH 056/126] target-s390: Convert MVCP, MVCS 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 | 4 ++++ target-s390x/translate.c | 49 ++++++++++++++++++++++------------------------ 2 files changed, 27 insertions(+), 26 deletions(-) diff --git a/target-s390x/insn-data.def b/target-s390x/insn-data.def index fa0711f..301e509 100644 --- a/target-s390x/insn-data.def +++ b/target-s390x/insn-data.def @@ -461,6 +461,10 @@ C(0x8300, DIAG, RX_a, Z, 0, 0, 0, 0, diag, 0) /* LOAD PSW */ C(0x8200, LPSW, S, Z, 0, a2, 0, 0, lpsw, 0) +/* MOVE TO PRIMARY */ + C(0xda00, MVCP, SS_d, Z, la1, a2, 0, 0, mvcp, 0) +/* MOVE TO SECONDARY */ + C(0xdb00, MVCS, SS_d, Z, la1, a2, 0, 0, mvcs, 0) /* SET ADDRESSING MODE */ /* We only do 64-bit, so accept this as a no-op. Let SAM24 and SAM31 signal illegal instruction. */ diff --git a/target-s390x/translate.c b/target-s390x/translate.c index b3f79bd..c8ab897 100644 --- a/target-s390x/translate.c +++ b/target-s390x/translate.c @@ -1994,7 +1994,7 @@ static void disas_s390_insn(DisasContext *s) TCGv_i32 tmp32_1, tmp32_2; unsigned char opc; uint64_t insn; - int op, r1, r2, r3, d1, d2, x2, b1, b2, r1b; + int op, r1, r2, r3, d2, x2, b2, r1b; opc = cpu_ldub_code(cpu_single_env, s->pc); LOG_DISAS("opc 0x%x\n", opc); @@ -2132,31 +2132,6 @@ static void disas_s390_insn(DisasContext *s) tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_2); break; -#ifndef CONFIG_USER_ONLY - case 0xda: /* MVCP D1(R1,B1),D2(B2),R3 [SS] */ - case 0xdb: /* MVCS D1(R1,B1),D2(B2),R3 [SS] */ - check_privileged(s); - potential_page_fault(s); - insn = ld_code6(s->pc); - r1 = (insn >> 36) & 0xf; - r3 = (insn >> 32) & 0xf; - b1 = (insn >> 28) & 0xf; - d1 = (insn >> 16) & 0xfff; - b2 = (insn >> 12) & 0xf; - d2 = insn & 0xfff; - /* XXX key in r3 */ - tmp = get_address(s, 0, b1, d1); - tmp2 = get_address(s, 0, b2, d2); - if (opc == 0xda) { - gen_helper_mvcp(cc_op, cpu_env, regs[r1], tmp, tmp2); - } else { - gen_helper_mvcs(cc_op, cpu_env, regs[r1], tmp, tmp2); - } - set_cc_static(s); - tcg_temp_free_i64(tmp); - tcg_temp_free_i64(tmp2); - break; -#endif case 0xe3: insn = ld_code6(s->pc); debug_insn(insn); @@ -3046,6 +3021,28 @@ static ExitStatus op_mvcle(DisasContext *s, DisasOps *o) return NO_EXIT; } +#ifndef CONFIG_USER_ONLY +static ExitStatus op_mvcp(DisasContext *s, DisasOps *o) +{ + int r1 = get_field(s->fields, l1); + check_privileged(s); + potential_page_fault(s); + gen_helper_mvcp(cc_op, cpu_env, regs[r1], o->addr1, o->in2); + set_cc_static(s); + return NO_EXIT; +} + +static ExitStatus op_mvcs(DisasContext *s, DisasOps *o) +{ + int r1 = get_field(s->fields, l1); + check_privileged(s); + potential_page_fault(s); + gen_helper_mvcs(cc_op, cpu_env, regs[r1], o->addr1, o->in2); + set_cc_static(s); + return NO_EXIT; +} +#endif + static ExitStatus op_mul(DisasContext *s, DisasOps *o) { tcg_gen_mul_i64(o->out, o->in1, o->in2);