Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NlOYk-0002ta-Qu for qemu-devel@nongnu.org; Sat, 27 Feb 2010 10:26:26 -0500 Received: from [199.232.76.173] (port=50660 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NlOYk-0002tB-2J for qemu-devel@nongnu.org; Sat, 27 Feb 2010 10:26:26 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NlOYi-0006EH-MM for qemu-devel@nongnu.org; Sat, 27 Feb 2010 10:26:25 -0500 Received: from hall.aurel32.net ([88.191.82.174]:54226) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NlOYi-0006ED-As for qemu-devel@nongnu.org; Sat, 27 Feb 2010 10:26:24 -0500 Date: Sat, 27 Feb 2010 16:26:19 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] target-ppc: fix SPE evsplat* instructions Message-ID: <20100227152619.GE10291@volta.aurel32.net> References: <1266956491-30704-1-git-send-email-froydnj@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1266956491-30704-1-git-send-email-froydnj@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nathan Froyd Cc: qemu-devel@nongnu.org On Tue, Feb 23, 2010 at 12:21:31PM -0800, Nathan Froyd wrote: > The shifts in the gen_evsplat* functions were expecting rA to be masked, > not extracted, and so used the wrong shift amounts to sign-extend or pad > with zeroes. > > Signed-off-by: Nathan Froyd Thanks, applied. > --- > target-ppc/translate.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/target-ppc/translate.c b/target-ppc/translate.c > index d4e81ce..0b11fda 100644 > --- a/target-ppc/translate.c > +++ b/target-ppc/translate.c > @@ -7001,7 +7001,7 @@ static inline void gen_evmergelohi(DisasContext *ctx) > } > static inline void gen_evsplati(DisasContext *ctx) > { > - uint64_t imm = ((int32_t)(rA(ctx->opcode) << 11)) >> 27; > + uint64_t imm = ((int32_t)(rA(ctx->opcode) << 27)) >> 27; > > #if defined(TARGET_PPC64) > tcg_gen_movi_tl(cpu_gpr[rD(ctx->opcode)], (imm << 32) | imm); > @@ -7012,7 +7012,7 @@ static inline void gen_evsplati(DisasContext *ctx) > } > static inline void gen_evsplatfi(DisasContext *ctx) > { > - uint64_t imm = rA(ctx->opcode) << 11; > + uint64_t imm = rA(ctx->opcode) << 27; > > #if defined(TARGET_PPC64) > tcg_gen_movi_tl(cpu_gpr[rD(ctx->opcode)], (imm << 32) | imm); > -- > 1.6.3.2 > > > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net