From patchwork Sun Sep 9 21:05:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 182679 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 1CFE32C009D for ; Mon, 10 Sep 2012 08:06:30 +1000 (EST) Received: from localhost ([::1]:41319 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TApe8-0001AM-50 for incoming@patchwork.ozlabs.org; Sun, 09 Sep 2012 18:06:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAoir-0007w3-9a for qemu-devel@nongnu.org; Sun, 09 Sep 2012 17:07:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TAoip-00063k-BJ for qemu-devel@nongnu.org; Sun, 09 Sep 2012 17:07:17 -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 1TAoip-0005pQ-5L for qemu-devel@nongnu.org; Sun, 09 Sep 2012 17:07:15 -0400 Received: by mail-pb0-f45.google.com with SMTP id rp12so291958pbb.4 for ; Sun, 09 Sep 2012 14:07:14 -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=dP9qvlub2zVgmuasMmf7Vt9moO2ymXFwZ6NzV6XDfoU=; b=xbXIgNbzWb0jqboX7N43aGaz154vBSjpK46gTEx5p5muPTHu+LcjWqT8KgjjK1PDp6 Y9qHMfRY8uCV+wxPJh9ChDyTSe+ZmQSP9LgkG6woafPz06G2tRdajEAIUfaNi+vKWdj1 MTtmKydXWrCmPc4mQMbVwd1wm0BsehcA07d0+OkIefTe3q7v7o8hRDlc4jVRBwKgmKnC V5ahskl++zgyQAD3QZ0V/e0eBz66qNa6sfoQXYhe0SqddN2lnVfe0ifqW+Hm29D0j/HB /UmknJlVt2PQglv7HG+uP/N/1wcXefjVTyG2+OOrj+SG18KtfZGEe57N7Kd+zx+K70+W 7t4g== Received: by 10.68.217.69 with SMTP id ow5mr2025679pbc.35.1347224834922; Sun, 09 Sep 2012 14:07:14 -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.14 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 09 Sep 2012 14:07:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 9 Sep 2012 14:05:06 -0700 Message-Id: <1347224784-19472-49-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 048/126] target-s390: Convert MOVE 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 | 6 ++++++ target-s390x/translate.c | 27 +++++++++++---------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/target-s390x/insn-data.def b/target-s390x/insn-data.def index b1f0448..81f2917 100644 --- a/target-s390x/insn-data.def +++ b/target-s390x/insn-data.def @@ -276,6 +276,12 @@ /* LOAD MULTIPLE HIGH */ C(0xeb96, LMH, RSY_a, Z, 0, a2, 0, 0, lmh, 0) +/* MOVE */ + C(0xe544, MVHHI, SIL, GIE, la1, i2, 0, m1_16, mov2, 0) + C(0xe54c, MVHI, SIL, GIE, la1, i2, 0, m1_32, mov2, 0) + C(0xe548, MVGHI, SIL, GIE, la1, i2, 0, m1_64, mov2, 0) + C(0x9200, MVI, SI, Z, la1, i2, 0, m1_8, mov2, 0) + C(0xeb52, MVIY, SIY, LD, la1, i2, 0, m1_8, mov2, 0) /* MOVE LONG */ C(0x0e00, MVCL, RR_a, Z, 0, 0, 0, 0, mvcl, 0) diff --git a/target-s390x/translate.c b/target-s390x/translate.c index 4c5540d..ec7ccd3 100644 --- a/target-s390x/translate.c +++ b/target-s390x/translate.c @@ -1325,7 +1325,7 @@ static void disas_e5(DisasContext* s, uint64_t insn) static void disas_eb(DisasContext *s, int op, int r1, int r3, int b2, int d2) { - TCGv_i64 tmp, tmp2; + TCGv_i64 tmp; TCGv_i32 tmp32_1, tmp32_2; LOG_DISAS("disas_eb: op 0x%x r1 %d r3 %d b2 %d d2 0x%x\n", @@ -1391,13 +1391,6 @@ static void disas_eb(DisasContext *s, int op, int r1, int r3, int b2, int d2) tcg_temp_free_i32(tmp32_1); tcg_temp_free_i32(tmp32_2); break; - case 0x52: /* MVIY D1(B1),I2 [SIY] */ - tmp = get_address(s, 0, b2, d2); /* SIY -> this is the destination */ - tmp2 = tcg_const_i64((r1 << 4) | r3); - tcg_gen_qemu_st8(tmp2, tmp, get_mem_index(s)); - tcg_temp_free_i64(tmp); - tcg_temp_free_i64(tmp2); - break; default: LOG_DISAS("illegal eb operation 0x%x\n", op); gen_illegal_opcode(s); @@ -2233,14 +2226,6 @@ static void disas_s390_insn(DisasContext *s) LOG_DISAS("opc 0x%x\n", opc); switch (opc) { - case 0x92: /* MVI D1(B1),I2 [SI] */ - insn = ld_code4(s->pc); - tmp = decode_si(s, insn, &i2, &b1, &d1); - tmp2 = tcg_const_i64(i2); - tcg_gen_qemu_st8(tmp2, tmp, get_mem_index(s)); - tcg_temp_free_i64(tmp); - tcg_temp_free_i64(tmp2); - break; case 0x94: /* NI D1(B1),I2 [SI] */ case 0x96: /* OI D1(B1),I2 [SI] */ case 0x97: /* XI D1(B1),I2 [SI] */ @@ -3838,6 +3823,16 @@ static void wout_cond_e1e2(DisasContext *s, DisasFields *f, DisasOps *o) } } +static void wout_m1_8(DisasContext *s, DisasFields *f, DisasOps *o) +{ + tcg_gen_qemu_st8(o->out, o->addr1, get_mem_index(s)); +} + +static void wout_m1_16(DisasContext *s, DisasFields *f, DisasOps *o) +{ + tcg_gen_qemu_st16(o->out, o->addr1, get_mem_index(s)); +} + static void wout_m1_32(DisasContext *s, DisasFields *f, DisasOps *o) { tcg_gen_qemu_st32(o->out, o->addr1, get_mem_index(s));