From patchwork Fri Sep 28 00:08:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 187597 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 2AB412C00B5 for ; Fri, 28 Sep 2012 10:08:34 +1000 (EST) Received: from localhost ([::1]:46017 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THO88-0004Fj-8F for incoming@patchwork.ozlabs.org; Thu, 27 Sep 2012 20:08:32 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33994) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THO81-0004Fe-Hd for qemu-devel@nongnu.org; Thu, 27 Sep 2012 20:08:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1THO80-0006m2-C7 for qemu-devel@nongnu.org; Thu, 27 Sep 2012 20:08:25 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:59315) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THO80-0006lx-4h for qemu-devel@nongnu.org; Thu, 27 Sep 2012 20:08:24 -0400 Received: by pbbrp2 with SMTP id rp2so4340585pbb.4 for ; Thu, 27 Sep 2012 17:08:23 -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=6gJmrNWVLMv1YT3fBk/hv1k5mdQtg/Pm8Md0Lkknd1Q=; b=h/Gjs0MGDbr5ELgL+hfszoAITHvFhh9Xy15UflQ7p9F5XDhAukAz/7Ku8tpa1Tjk5s mhXAHA0zF1Ky5YW/lkL7/IHRv3JCAArLM4QQMFcOGBpoTjIs5sVYLHQN4pAZq4XCeet/ IKdd+2s0E+x0Ltjzw0eMalF5sdvSoZnO5ki5HAL3CiPufq4MyTKxJykwy3O26cDuLESB DFID/KfGOcV0d4f+cN0+NL595btIqgsrTtsWJzMxko8aSVJIZ4Apyf0H9Tm4VHnSfPBg lyb9QxJHTx1TsfmgHByQXFMS3mHLqGt+I5+mx4ysqMNbpu90taNMCy43qcz3LjNTXyf/ sv3Q== Received: by 10.68.232.163 with SMTP id tp3mr15847592pbc.44.1348790903393; Thu, 27 Sep 2012 17:08:23 -0700 (PDT) Received: from anchor.twiddle.home.com ([173.160.232.49]) by mx.google.com with ESMTPS id pi1sm4594702pbb.7.2012.09.27.17.08.22 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 27 Sep 2012 17:08:22 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 27 Sep 2012 17:08:20 -0700 Message-Id: <1348790900-25905-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 075/147] target-s390: Convert LLGT 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 | 3 +++ target-s390x/translate.c | 50 ++++++---------------------------------------- 2 files changed, 9 insertions(+), 44 deletions(-) diff --git a/target-s390x/insn-data.def b/target-s390x/insn-data.def index fa3ee00..8914d34 100644 --- a/target-s390x/insn-data.def +++ b/target-s390x/insn-data.def @@ -285,6 +285,9 @@ D(0xa50d, LLIHL, RI_a, Z, 0, i2_16u_shl, 0, r1, mov2, 0, 32) D(0xa50e, LLILH, RI_a, Z, 0, i2_16u_shl, 0, r1, mov2, 0, 16) D(0xa50f, LLILL, RI_a, Z, 0, i2_16u_shl, 0, r1, mov2, 0, 0) +/* LOAD LOGICAL THIRTY ONE BITS */ + C(0xb917, LLGTR, RRE, Z, 0, r2_o, r1, 0, llgt, 0) + C(0xe317, LLGT, RXY_a, Z, 0, m2_32u, r1, 0, llgt, 0) /* LOAD NEGATIVE */ C(0x1100, LNR, RR_a, Z, 0, r2_32s, new, r1_32, nabs, nabs32) C(0xb901, LNGR, RRE, Z, 0, r2, r1, 0, nabs, nabs64) diff --git a/target-s390x/translate.c b/target-s390x/translate.c index 4757713..739d665 100644 --- a/target-s390x/translate.c +++ b/target-s390x/translate.c @@ -1001,30 +1001,6 @@ static void free_compare(DisasCompare *c) } } -static void disas_e3(CPUS390XState *env, DisasContext* s, int op, int r1, - int x2, int b2, int d2) -{ - TCGv_i64 addr, tmp2; - - LOG_DISAS("disas_e3: op 0x%x r1 %d x2 %d b2 %d d2 %d\n", - op, r1, x2, b2, d2); - addr = get_address(s, x2, b2, d2); - switch (op) { - case 0x17: /* LLGT R1,D2(X2,B2) [RXY] */ - tmp2 = tcg_temp_new_i64(); - tcg_gen_qemu_ld32u(tmp2, addr, get_mem_index(s)); - tcg_gen_andi_i64(tmp2, tmp2, 0x7fffffffULL); - store_reg(r1, tmp2); - tcg_temp_free_i64(tmp2); - break; - default: - LOG_DISAS("illegal e3 operation 0x%x\n", op); - gen_illegal_opcode(s); - break; - } - tcg_temp_free_i64(addr); -} - static void disas_ed(CPUS390XState *env, DisasContext *s, int op, int r1, int x2, int b2, int d2, int r1b) { @@ -1804,15 +1780,6 @@ static void disas_b9(CPUS390XState *env, DisasContext *s, int op, int r1, LOG_DISAS("disas_b9: op 0x%x r1 %d r2 %d\n", op, r1, r2); switch (op) { - case 0x17: /* LLGTR R1,R2 [RRE] */ - tmp32_1 = load_reg32(r2); - tmp = tcg_temp_new_i64(); - tcg_gen_andi_i32(tmp32_1, tmp32_1, 0x7fffffffUL); - tcg_gen_extu_i32_i64(tmp, tmp32_1); - store_reg(r1, tmp); - tcg_temp_free_i32(tmp32_1); - tcg_temp_free_i64(tmp); - break; case 0x83: /* FLOGR R1,R2 [RRE] */ tmp = load_reg(r2); tmp32_1 = tcg_const_i32(r1); @@ -1858,17 +1825,6 @@ static void disas_s390_insn(CPUS390XState *env, DisasContext *s) op = (insn >> 16) & 0xff; disas_b9(env, s, op, r1, r2); break; - case 0xe3: - insn = ld_code6(env, s->pc); - debug_insn(insn); - op = insn & 0xff; - r1 = (insn >> 36) & 0xf; - x2 = (insn >> 32) & 0xf; - b2 = (insn >> 28) & 0xf; - d2 = ((int)((((insn >> 16) & 0xfff) - | ((insn << 4) & 0xff000)) << 12)) >> 12; - disas_e3(env, s, op, r1, x2, b2, d2 ); - break; case 0xed: insn = ld_code6(env, s->pc); debug_insn(insn); @@ -2654,6 +2610,12 @@ static ExitStatus op_insi(DisasContext *s, DisasOps *o) return NO_EXIT; } +static ExitStatus op_llgt(DisasContext *s, DisasOps *o) +{ + tcg_gen_andi_i64(o->out, o->in2, 0x7fffffff); + return NO_EXIT; +} + static ExitStatus op_ld8s(DisasContext *s, DisasOps *o) { tcg_gen_qemu_ld8s(o->out, o->in2, get_mem_index(s));