From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kho3Z-0002tT-E4 for qemu-devel@nongnu.org; Mon, 22 Sep 2008 12:14:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kho3X-0002sU-JM for qemu-devel@nongnu.org; Mon, 22 Sep 2008 12:14:36 -0400 Received: from [199.232.76.173] (port=41347 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kho3X-0002sF-5e for qemu-devel@nongnu.org; Mon, 22 Sep 2008 12:14:35 -0400 Received: from mail-gx0-f19.google.com ([209.85.217.19]:62190) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kho3W-00014V-6L for qemu-devel@nongnu.org; Mon, 22 Sep 2008 12:14:34 -0400 Received: by gxk12 with SMTP id 12so3439812gxk.10 for ; Mon, 22 Sep 2008 09:14:32 -0700 (PDT) Message-ID: Date: Mon, 22 Sep 2008 19:14:31 +0300 From: "Blue Swirl" Subject: Re: [Qemu-devel] [5281] Use the new concat_i32_i64 op for std and stda In-Reply-To: <20080921211908.GB22151@networkno.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200809211741.53544.paul@codesourcery.com> <20080921211908.GB22151@networkno.de> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thiemo Seufer Cc: Paul Brook , qemu-devel@nongnu.org On 9/22/08, Thiemo Seufer wrote: > Blue Swirl wrote: > > On 9/21/08, Paul Brook wrote: > > > > Like these patches? > > > > > > > +static inline void tcg_gen_concat_i64_i64(TCGv dest, TCGv low, TCGv high) > > > > +{ > > > > + TCGv tmp = tcg_temp_new(TCG_TYPE_I64); > > > > + tcg_gen_shli_i64(tmp, high, 32); > > > > + tcg_gen_or_i64(dest, low, tmp); > > > > + tcg_temp_free(tmp); > > > > +} > > > > > > This should use concat_i32_i64 on 32-bit hosts. > > > > > > Ok with that change, the rename I suggested in my previous mail, and if you > > > add documentation to tcg/README. > > > > Updated. I'll run a couple of tests. > > > I noticed I could also use the complement ("split"?) to those > instructions in the mips backend. Maybe the same is true for > sparc. Currently I'm using the following: tcg_gen_trunc_i64_tl(cpu_tmp0, cpu_tmp64); tcg_gen_andi_tl(cpu_tmp0, cpu_tmp0, 0xffffffffULL); gen_movl_TN_reg(rd + 1, cpu_tmp0); tcg_gen_shri_i64(cpu_tmp64, cpu_tmp64, 32); tcg_gen_trunc_i64_tl(cpu_val, cpu_tmp64); tcg_gen_andi_tl(cpu_val, cpu_val, 0xffffffffULL); On a 32 bit host a much more efficient method could be used if wrapped in an op.