From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWcnb-0008SP-5f for qemu-devel@nongnu.org; Mon, 08 Aug 2016 01:08:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bWcnW-0000dv-Sv for qemu-devel@nongnu.org; Mon, 08 Aug 2016 01:08:25 -0400 Sender: Richard Henderson References: <1470591415-3268-1-git-send-email-nikunj@linux.vnet.ibm.com> <1470591415-3268-4-git-send-email-nikunj@linux.vnet.ibm.com> From: Richard Henderson Message-ID: <76465f4d-6c9d-a90b-1efa-68bc7b7ac98c@twiddle.net> Date: Mon, 8 Aug 2016 10:38:14 +0530 MIME-Version: 1.0 In-Reply-To: <1470591415-3268-4-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 3/6] target-ppc: add lxsi[bw]zx 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 GEN_QEMU_LOAD_64(ldop, ext) \ > +static void glue(gen_qemu_, glue(ldop, _i64))(DisasContext *ctx, \ > + TCGv_i64 val, \ > + TCGv addr) \ > +{ \ > + TCGv tmp = tcg_temp_new(); \ > + gen_qemu_##ldop(ctx, tmp, addr); \ > + tcg_gen_##ext##_tl_i64(val, tmp); \ > + tcg_temp_free(tmp); \ > } > > +GEN_QEMU_LOAD_64(ld8u, extu) > +GEN_QEMU_LOAD_64(ld16u, extu) > +GEN_QEMU_LOAD_64(ld32u, extu) > +GEN_QEMU_LOAD_64(ld32s, ext) This is a good opportunity to clean up a bit of the ppc translator and convert to the newer tcg_gen_qemu_ld_i64 function. This will eliminate the need for the extension that you're performing here. r~