Received: from eggs.gnu.org ([2001:4830:134:3::10]:41227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7tz3-0001JR-Ke for qemu-devel@nongnu.org; Mon, 27 Jan 2014 16:44:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W7tyw-0007zI-77 for qemu-devel@nongnu.org; Mon, 27 Jan 2014 16:44:45 -0500 Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) From: Alexander Graf In-Reply-To: <52E6B4D7.9070405@gmail.com> Date: Mon, 27 Jan 2014 22:44:35 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <1B77761E-F3EC-49D2-8312-7EBFA8041ACF@suse.de> References: <1390845264-2532-1-git-send-email-tommusta@gmail.com> <1390845264-2532-4-git-send-email-tommusta@gmail.com> <52E6B4D7.9070405@gmail.com> Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 3/8] target-ppc: Add bctar Instruction List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Tom Musta Cc: open@suse.de, "list@suse.de:PowerPC" , QEMU Developers On 27.01.2014, at 20:34, Tom Musta wrote: > On 1/27/2014 12:46 PM, Alexander Graf wrote: >>> static inline void gen_bcond(DisasContext *ctx, int type) >>>> { >>>> @@ -3756,10 +3757,12 @@ static inline void gen_bcond(DisasContext = *ctx, int type) >>>> TCGv target; >>>>=20 >>>> ctx->exception =3D POWERPC_EXCP_BRANCH; >>>> - if (type =3D=3D BCOND_LR || type =3D=3D BCOND_CTR) { >>>> + if (type =3D=3D BCOND_LR || type =3D=3D BCOND_CTR || type =3D=3D= BCOND_TAR) { >>>> target =3D tcg_temp_local_new(); >>>> if (type =3D=3D BCOND_CTR) >>>> tcg_gen_mov_tl(target, cpu_ctr); >>>> + else if (type =3D=3D BCOND_TAR) >>>> + gen_load_spr(target, SPR_TAR); >> How frequently is this used in generated code? Would it make sense to = make it a global TCG variable? >>=20 >=20 > I have not yet seen a case of this being generated by the newer = compilers. But it is certainly not difficult > or much more code to make it be a global. Well, we shouldn't waste a global on a register that doesn't get used = frequently, so I'd say we leave it like this for now and change it to a = global if / when we see it used often. Alex