From patchwork Fri Oct 11 12:57:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Musta X-Patchwork-Id: 282739 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D1A782C00CC for ; Fri, 11 Oct 2013 23:58:04 +1100 (EST) Received: from localhost ([::1]:54172 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUcI6-0001nm-RL for incoming@patchwork.ozlabs.org; Fri, 11 Oct 2013 08:58:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUcHj-0001nY-KF for qemu-devel@nongnu.org; Fri, 11 Oct 2013 08:57:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VUcHb-0006Qv-75 for qemu-devel@nongnu.org; Fri, 11 Oct 2013 08:57:39 -0400 Received: from mail-qe0-x234.google.com ([2607:f8b0:400d:c02::234]:46583) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUcHK-0006Nq-6U; Fri, 11 Oct 2013 08:57:14 -0400 Received: by mail-qe0-f52.google.com with SMTP id w7so3218805qeb.11 for ; Fri, 11 Oct 2013 05:57:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=buQkg962XkB4oapfgcwA4XW56JgQ7vZV4NPLioUlFis=; b=HjlDZSVP9w3GqPjSHbTpS1U2ck0jfFfHbd4GZ1rdPcwsdPKmNoKaabp+tDu+UGBFNR ++Pz9Yswg0BUdlGWZb+Qw8OU2zNY9gQ1fvOSP+6+/iKJowib60q00/tyTyigA16teZz8 Cd4wB/QkB2AGfN5EVPvpsOfWrnaNubscpG+z3Bfmxq+TyTpGyfwrGt0Ebk9YdBGsiRVa IOmLymn8bZg1TyA4dyWZhg2g7727y73+ce5Qj/2ChShDEoIRNmdBSpxuW4fRXvtavB5s I5S0ydYYMB/G0+Sv56hSTvDLrkyTk2DPFYX1A2xunSl7LDrUmM6o72cKj51enYy99uNe hkAA== X-Received: by 10.224.119.130 with SMTP id z2mr3456287qaq.62.1381496233660; Fri, 11 Oct 2013 05:57:13 -0700 (PDT) Received: from [9.10.80.13] (rchp4.rochester.ibm.com. [129.42.161.36]) by mx.google.com with ESMTPSA id r5sm110194785qaj.13.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Oct 2013 05:57:12 -0700 (PDT) Message-ID: <5257F5A2.3050108@gmail.com> Date: Fri, 11 Oct 2013 07:57:06 -0500 From: Tom Musta User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: qemu-ppc@nongnu.org References: <5257F4DD.7000204@gmail.com> In-Reply-To: <5257F4DD.7000204@gmail.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c02::234 Cc: Tom Musta , qemu-devel@nongnu.org Subject: [Qemu-devel] [v2 02/13] Add lxsdx 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 This patch adds the Load VSX Scalar Doubleowrd Indexed (lxsdx) instruction. The lower 8 bytes of the target register are undefined; this implementation leaves those bytes unaltered. Signed-off-by: Tom Musta Reviewed-by: Paolo Bonzini --- target-ppc/translate.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index bd5e89d..6ee0d80 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -7007,6 +7007,21 @@ static inline TCGv_i64 cpu_vsrl(int n) } } +static void gen_lxsdx(DisasContext *ctx) +{ + TCGv EA; + if (unlikely(!ctx->vsx_enabled)) { + gen_exception(ctx, POWERPC_EXCP_VSXU); + return; + } + gen_set_access_type(ctx, ACCESS_INT); + EA = tcg_temp_new(); + gen_addr_reg_index(ctx, EA); + gen_qemu_ld64(ctx, cpu_vsrh(xT(ctx->opcode)), EA); + /* NOTE: cpu_vsrl is undefined */ + tcg_temp_free(EA); +} + static void gen_lxvd2x(DisasContext *ctx) { TCGv EA; @@ -9518,6 +9533,7 @@ GEN_VAFORM_PAIRED(vmsumshm, vmsumshs, 20), GEN_VAFORM_PAIRED(vsel, vperm, 21), GEN_VAFORM_PAIRED(vmaddfp, vnmsubfp, 23), +GEN_HANDLER_E(lxsdx, 0x1F, 0x0C, 0x12, 0, PPC_NONE, PPC2_VSX), GEN_HANDLER_E(lxvd2x, 0x1F, 0x0C, 0x1A, 0, PPC_NONE, PPC2_VSX), GEN_HANDLER_E(stxvd2x, 0x1F, 0xC, 0x1E, 0, PPC_NONE, PPC2_VSX),