From patchwork Thu Oct 31 22:58:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 287679 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 7CBD92C0340 for ; Fri, 1 Nov 2013 09:58:57 +1100 (EST) Received: from localhost ([::1]:59638 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vc1CY-0007rn-Cd for incoming@patchwork.ozlabs.org; Thu, 31 Oct 2013 18:58:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vc1CA-0007og-6E for qemu-devel@nongnu.org; Thu, 31 Oct 2013 18:58:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vc1C1-0005m9-V4 for qemu-devel@nongnu.org; Thu, 31 Oct 2013 18:58:30 -0400 Received: from cantor2.suse.de ([195.135.220.15]:57548 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vc1C1-0005m2-Ot; Thu, 31 Oct 2013 18:58:21 -0400 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id CCD7FA5B27; Thu, 31 Oct 2013 23:58:20 +0100 (CET) Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1812\)) From: Alexander Graf In-Reply-To: <5257F5A2.3050108@gmail.com> Date: Thu, 31 Oct 2013 15:58:13 -0700 Message-Id: References: <5257F4DD.7000204@gmail.com> <5257F5A2.3050108@gmail.com> To: Tom Musta X-Mailer: Apple Mail (2.1812) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 195.135.220.15 Cc: "open list:PReP" , QEMU Developers Subject: Re: [Qemu-devel] [Qemu-ppc] [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 On 11.10.2013, at 05:57, Tom Musta wrote: > 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 The diff seems to be broken. Patchworks and my mail client show 2 spaces in "already existing code" parts of the patch. Alex 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),