From patchwork Sun Sep 9 21:05:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 182699 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 882082C009F for ; Mon, 10 Sep 2012 08:36:49 +1000 (EST) Received: from localhost ([::1]:45075 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAq7T-00036P-KC for incoming@patchwork.ozlabs.org; Sun, 09 Sep 2012 18:36:47 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57180) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAojM-00007o-DP for qemu-devel@nongnu.org; Sun, 09 Sep 2012 17:07:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TAojL-0006Ed-D2 for qemu-devel@nongnu.org; Sun, 09 Sep 2012 17:07:48 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:59699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAojL-0005pQ-75 for qemu-devel@nongnu.org; Sun, 09 Sep 2012 17:07:47 -0400 Received: by mail-pb0-f45.google.com with SMTP id rp12so291958pbb.4 for ; Sun, 09 Sep 2012 14:07:47 -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=CkBvGyvECU2lyFAAvz8V3kxzMTivphCxUs5uTCwfcws=; b=LrMajnwFrSizpLeOQjbcY3Xr0O+VkI0bTuN+35Lznb33e7OMvdmDfY+JoV9x+fsJu2 kgd5aGz/ESZKREGEnzWakizibTA52tzbxrf0gQfgZz6NXj4YwUlMKkhsyJMlnnFEEKHF m7s+YY2rng8RPJg3M6xKzUJ1HBhwpsrvxmvcmbVlP8Zk7OaPqrrGoNf+M8BVMPu47xui 82ukjvPrxOFxJUsEMj6stFtKKCa16fu74+g1qX4/UjRqi6iRWYKGgphSRhn4wLYIMEb9 6jJ5i7C5qA03ou18U7fVJLzyCOCCqRZ7NXVzjIMW+I82oOZ6PZfGrHuroIHluGjXnwhI sYqA== Received: by 10.68.225.199 with SMTP id rm7mr2073744pbc.150.1347224866987; Sun, 09 Sep 2012 14:07:46 -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.46 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 09 Sep 2012 14:07:46 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 9 Sep 2012 14:05:43 -0700 Message-Id: <1347224784-19472-86-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.160.45 Cc: Alexander Graf Subject: [Qemu-devel] [PATCH 085/126] target-s390: Convert MVPG 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/mem_helper.c | 7 ++----- target-s390x/translate.c | 20 ++++++++------------ 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/target-s390x/insn-data.def b/target-s390x/insn-data.def index f282e99..4b30dd5 100644 --- a/target-s390x/insn-data.def +++ b/target-s390x/insn-data.def @@ -394,6 +394,8 @@ C(0x0e00, MVCL, RR_a, Z, 0, 0, 0, 0, mvcl, 0) /* MOVE LONG EXTENDED */ C(0xa800, MVCLE, RS_a, Z, 0, a2, 0, 0, mvcle, 0) +/* MOVE PAGE */ + C(0xb254, MVPG, RRE, Z, r1_o, r2_o, 0, 0, mvpg, 0) /* MULTIPLY */ C(0x1c00, MR, RR_a, Z, r1p1_32s, r2_32s, new, r1_D32, mul, 0) diff --git a/target-s390x/mem_helper.c b/target-s390x/mem_helper.c index 5f70aad..e9cacf9 100644 --- a/target-s390x/mem_helper.c +++ b/target-s390x/mem_helper.c @@ -404,12 +404,9 @@ uint32_t HELPER(clst)(CPUS390XState *env, uint32_t c, uint32_t r1, uint32_t r2) void HELPER(mvpg)(CPUS390XState *env, uint64_t r0, uint64_t r1, uint64_t r2) { /* XXX missing r0 handling */ + env->cc_op = 0; #ifdef CONFIG_USER_ONLY - int i; - - for (i = 0; i < TARGET_PAGE_SIZE; i++) { - cpu_stb_data(env, r1 + i, cpu_ldub_data(env, r2 + i)); - } + memmove(g2h(r1), g2h(r2), TARGET_PAGE_SIZE); #else mvc_fast_memmove(env, TARGET_PAGE_SIZE, r1, r2); #endif diff --git a/target-s390x/translate.c b/target-s390x/translate.c index 08a3e77..a49475b 100644 --- a/target-s390x/translate.c +++ b/target-s390x/translate.c @@ -1031,18 +1031,6 @@ static void disas_b2(DisasContext *s, int op, uint32_t insn) LOG_DISAS("disas_b2: op 0x%x r1 %d r2 %d\n", op, r1, r2); switch (op) { - case 0x54: /* MVPG R1,R2 [RRE] */ - tmp = load_reg(0); - tmp2 = load_reg(r1); - tmp3 = load_reg(r2); - potential_page_fault(s); - gen_helper_mvpg(cpu_env, tmp, tmp2, tmp3); - tcg_temp_free_i64(tmp); - tcg_temp_free_i64(tmp2); - tcg_temp_free_i64(tmp3); - /* XXX check CCO bit and set CC accordingly */ - gen_op_movi_cc(s, 0); - break; case 0x55: /* MVST R1,R2 [RRE] */ tmp32_1 = load_reg32(0); tmp32_2 = tcg_const_i32(r1); @@ -2593,6 +2581,14 @@ static ExitStatus op_mvcs(DisasContext *s, DisasOps *o) } #endif +static ExitStatus op_mvpg(DisasContext *s, DisasOps *o) +{ + potential_page_fault(s); + gen_helper_mvpg(cpu_env, regs[0], o->in1, o->in2); + set_cc_static(s); + return NO_EXIT; +} + static ExitStatus op_mul(DisasContext *s, DisasOps *o) { tcg_gen_mul_i64(o->out, o->in1, o->in2);