Received: from eggs.gnu.org ([2001:4830:134:3::10]:45852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWcPL-00010e-Mz for qemu-devel@nongnu.org; Mon, 08 Aug 2016 00:43:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bWcPF-0005oC-Md for qemu-devel@nongnu.org; Mon, 08 Aug 2016 00:43:22 -0400 Sender: Richard Henderson References: <1470591415-3268-1-git-send-email-nikunj@linux.vnet.ibm.com> <1470591415-3268-2-git-send-email-nikunj@linux.vnet.ibm.com> From: Richard Henderson Message-ID: Date: Mon, 8 Aug 2016 10:13:05 +0530 MIME-Version: 1.0 In-Reply-To: <1470591415-3268-2-git-send-email-nikunj@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/6] target-ppc: add xxspltib instruction List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nikunj A Dadhania , qemu-ppc@nongnu.org, david@gibson.dropbear.id.au Cc: qemu-devel@nongnu.org, benh@kernel.crashing.org On 08/07/2016 11:06 PM, Nikunj A Dadhania wrote: > +#define pattern(x) (((x) & 0xff) * (~(target_ulong)0 / 0xff)) > + > +static void gen_xxspltib(DisasContext *ctx) > +{ > + unsigned char uim8 = IMM8(ctx->opcode); > + if (xS(ctx->opcode) < 32) { > + if (unlikely(!ctx->altivec_enabled)) { > + gen_exception(ctx, POWERPC_EXCP_VPU); > + return; > + } > + } else { > + if (unlikely(!ctx->vsx_enabled)) { > + gen_exception(ctx, POWERPC_EXCP_VSXU); > + return; > + } > + } > + tcg_gen_movi_i64(cpu_vsrh(xT(ctx->opcode)), pattern(uim8)); > + tcg_gen_movi_i64(cpu_vsrl(xT(ctx->opcode)), pattern(uim8)); > +} > + Is this protected by TARGET_PPC64? Otherwise the combination of movi_i64 and target_ulong looks odd. r~