From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQ90K-0000RC-TY for qemu-devel@nongnu.org; Thu, 21 Jul 2016 04:06:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQ90F-0004YM-R1 for qemu-devel@nongnu.org; Thu, 21 Jul 2016 04:06:47 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:65509 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQ90F-0004YG-Kx for qemu-devel@nongnu.org; Thu, 21 Jul 2016 04:06:43 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u6L84VIM137758 for ; Thu, 21 Jul 2016 04:06:43 -0400 Received: from e23smtp09.au.ibm.com (e23smtp09.au.ibm.com [202.81.31.142]) by mx0b-001b2d01.pphosted.com with ESMTP id 24aj3x690b-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 21 Jul 2016 04:06:43 -0400 Received: from localhost by e23smtp09.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 21 Jul 2016 18:06:40 +1000 From: Nikunj A Dadhania In-Reply-To: <6b568a67-b83b-a956-a4e8-ec0a087acea8@twiddle.net> References: <1468346602-20700-1-git-send-email-nikunj@linux.vnet.ibm.com> <1468346602-20700-4-git-send-email-nikunj@linux.vnet.ibm.com> <6b568a67-b83b-a956-a4e8-ec0a087acea8@twiddle.net> Date: Thu, 21 Jul 2016 13:36:34 +0530 MIME-Version: 1.0 Content-Type: text/plain Message-Id: <87lh0v9zzp.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me> Subject: Re: [Qemu-devel] [RFC 3/6] target-ppc: adding addpcis instruction List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson , qemu-ppc@nongnu.org, david@gibson.dropbear.id.au Cc: qemu-devel@nongnu.org, aneesh.kumar@linux.vnet.ibm.com Richard Henderson writes: > On 07/12/2016 11:33 PM, Nikunj A Dadhania wrote: >> +static void gen_addpcis(DisasContext *ctx) >> +{ >> + target_long d = DX(ctx->opcode); >> + >> + tcg_gen_movi_tl(cpu_gpr[rD(ctx->opcode)], ctx->nip); >> + tcg_gen_addi_tl(cpu_gpr[rD(ctx->opcode)], cpu_gpr[rD(ctx->opcode)], d); >> +} > > (1) You appear to have forgotten the "shift" part of "addpcis". Yes, i had not seen this reply. > (2) Both of these are translate-time constants, so... > > tcg_gen_movi_tl(cpu_gpr[rD(ctx->opcode)], ctx->nip + (d << 16)); Sure Regards Nikunj