From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQ7zn-0006hH-Ud for qemu-devel@nongnu.org; Thu, 21 Jul 2016 03:02:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQ7zj-0008TK-W1 for qemu-devel@nongnu.org; Thu, 21 Jul 2016 03:02:11 -0400 Sender: Richard Henderson References: <1468861517-2508-1-git-send-email-nikunj@linux.vnet.ibm.com> <1468861517-2508-13-git-send-email-nikunj@linux.vnet.ibm.com> From: Richard Henderson Message-ID: Date: Thu, 21 Jul 2016 12:32:01 +0530 MIME-Version: 1.0 In-Reply-To: <1468861517-2508-13-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] [RFC v1 12/13] target-ppc: add maddhd and maddhdu 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, aneesh.kumar@linux.vnet.ibm.com On 07/18/2016 10:35 PM, Nikunj A Dadhania wrote: > + tcg_gen_movi_i64(t2, -1); > + tcg_gen_movcond_i64(TCG_COND_GE, t2, cpu_gpr[rC(ctx->opcode)], zero, zero, neg); This is a simple sign-extension of rC. Better as tcg_gen_sari_i64(t2, cpu_gpr[rC(ctx->opcode)], 63); > + tcg_gen_mov_i64(t1, zero); > + tcg_gen_add2_i64(t1, cpu_gpr[rD(ctx->opcode)], lo, hi, cpu_gpr[rC(ctx->opcode)], t2); Pointless store of t1. Indeed, since we're discarding the value of t1, you might as well re-use t2 in the output and drop the t1 variable altogether. And, thus, rename t2 to something else. ;-) r~