From patchwork Thu Sep 27 22:40:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 187537 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 AD6C02C00B7 for ; Fri, 28 Sep 2012 09:11:12 +1000 (EST) Received: from localhost ([::1]:37044 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THNEc-00033c-IX for incoming@patchwork.ozlabs.org; Thu, 27 Sep 2012 19:11:10 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THMlG-0004Nx-7u for qemu-devel@nongnu.org; Thu, 27 Sep 2012 18:40:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1THMlE-0003T5-HP for qemu-devel@nongnu.org; Thu, 27 Sep 2012 18:40:50 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:56587) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THMlD-00034R-MX for qemu-devel@nongnu.org; Thu, 27 Sep 2012 18:40:48 -0400 Received: by mail-pb0-f45.google.com with SMTP id rp2so4262246pbb.4 for ; Thu, 27 Sep 2012 15:40: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=XYsf8iblWDla9RCRsJnYmaElu0nSdMo+vOrh4lcpd7c=; b=TmrH0RnlueUvUAVMygYtoa4D2RPf9ickkCFpHeXRHqXgMgVKaaTXGovjgpKHfOdVkS kXEPiu2/wuHcIkZVkpxc0Lcz93ibcaQhizq8ipbQQ3uKFVT72c7dz6DuUbCVt1QDtcsE B4HYQ0MjBBinklbYxYJSt1pnpDkz8U50fixZp7wJ1jK1MM9tu9DUAaG7h7Wf3GU4Lmhl n0jsyaji55zWenaDCkOHQs0LPUhdvse3iKBPa05Iqk6MA1zyJ9/SI705yj/heczw3E6N ReGzfdw6xebib96tvJM4veGSUxZCJHAwI/u4XcLcoMqpniagWq7rQpCBOskM3aEqypdO xY1g== Received: by 10.68.129.5 with SMTP id ns5mr15167089pbb.103.1348785647237; Thu, 27 Sep 2012 15:40:47 -0700 (PDT) Received: from anchor.twiddle.home.com ([173.160.232.49]) by mx.google.com with ESMTPS id sj5sm4480267pbc.30.2012.09.27.15.40.46 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 27 Sep 2012 15:40:46 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 27 Sep 2012 15:40:09 -0700 Message-Id: <1348785610-23418-29-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 028/147] target-s390: Convert LOAD LOGICAL IMMEDIATE 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 | 7 +++++++ target-s390x/translate.c | 42 ++++++++++++------------------------------ 2 files changed, 19 insertions(+), 30 deletions(-) diff --git a/target-s390x/insn-data.def b/target-s390x/insn-data.def index 7a8dcbd..89bc635 100644 --- a/target-s390x/insn-data.def +++ b/target-s390x/insn-data.def @@ -168,6 +168,13 @@ /* LOAD LOGICAL HALFWORD RELATIVE LONG */ C(0xc402, LLHRL, RIL_b, GIE, 0, ri2, new, r1_32, ld16u, 0) C(0xc406, LLGHRL, RIL_b, GIE, 0, ri2, r1, 0, ld16u, 0) +/* LOAD LOGICAL IMMEDATE */ + D(0xc00e, LLIHF, RIL_a, EI, 0, i2_32u_shl, 0, r1, mov2, 0, 32) + D(0xc00f, LLILF, RIL_a, EI, 0, i2_32u_shl, 0, r1, mov2, 0, 0) + D(0xa50c, LLIHH, RI_a, Z, 0, i2_16u_shl, 0, r1, mov2, 0, 48) + 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) /* MULTIPLY */ C(0x1c00, MR, RR_a, Z, r1p1_32s, r2_32s, new, r1_D32, mul, 0) diff --git a/target-s390x/translate.c b/target-s390x/translate.c index 4ea0e95..bc55a96 100644 --- a/target-s390x/translate.c +++ b/target-s390x/translate.c @@ -2033,26 +2033,6 @@ static void disas_a5(CPUS390XState *env, DisasContext *s, int op, int r1, tcg_temp_free_i32(tmp32); tcg_temp_free_i64(tmp); break; - case 0xc: /* LLIHH R1,I2 [RI] */ - tmp = tcg_const_i64( ((uint64_t)i2) << 48 ); - store_reg(r1, tmp); - tcg_temp_free_i64(tmp); - break; - case 0xd: /* LLIHL R1,I2 [RI] */ - tmp = tcg_const_i64( ((uint64_t)i2) << 32 ); - store_reg(r1, tmp); - tcg_temp_free_i64(tmp); - break; - case 0xe: /* LLILH R1,I2 [RI] */ - tmp = tcg_const_i64( ((uint64_t)i2) << 16 ); - store_reg(r1, tmp); - tcg_temp_free_i64(tmp); - break; - case 0xf: /* LLILL R1,I2 [RI] */ - tmp = tcg_const_i64(i2); - store_reg(r1, tmp); - tcg_temp_free_i64(tmp); - break; default: LOG_DISAS("illegal a5 operation 0x%x\n", op); gen_illegal_opcode(s); @@ -3043,16 +3023,6 @@ static void disas_c0(CPUS390XState *env, DisasContext *s, int op, int r1, int i2 tcg_temp_free_i64(tmp); tcg_temp_free_i32(tmp32_1); break; - case 0xe: /* LLIHF R1,I2 [RIL] */ - tmp = tcg_const_i64(((uint64_t)(uint32_t)i2) << 32); - store_reg(r1, tmp); - tcg_temp_free_i64(tmp); - break; - case 0xf: /* LLILF R1,I2 [RIL] */ - tmp = tcg_const_i64((uint32_t)i2); - store_reg(r1, tmp); - tcg_temp_free_i64(tmp); - break; default: LOG_DISAS("illegal c0 operation 0x%x\n", op); gen_illegal_opcode(s); @@ -4694,6 +4664,18 @@ static void in2_i2_32u(DisasContext *s, DisasFields *f, DisasOps *o) o->in2 = tcg_const_i64((uint32_t)get_field(f, i2)); } +static void in2_i2_16u_shl(DisasContext *s, DisasFields *f, DisasOps *o) +{ + uint64_t i2 = (uint16_t)get_field(f, i2); + o->in2 = tcg_const_i64(i2 << s->insn->data); +} + +static void in2_i2_32u_shl(DisasContext *s, DisasFields *f, DisasOps *o) +{ + uint64_t i2 = (uint32_t)get_field(f, i2); + o->in2 = tcg_const_i64(i2 << s->insn->data); +} + /* ====================================================================== */ /* Find opc within the table of insns. This is formulated as a switch