From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KhRUK-0004ri-6p for qemu-devel@nongnu.org; Sun, 21 Sep 2008 12:08:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KhRUG-0004rL-P5 for qemu-devel@nongnu.org; Sun, 21 Sep 2008 12:08:43 -0400 Received: from [199.232.76.173] (port=42396 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KhRUG-0004rI-Lx for qemu-devel@nongnu.org; Sun, 21 Sep 2008 12:08:40 -0400 Received: from wf-out-1314.google.com ([209.85.200.174]:54373) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KhRUG-00066X-3O for qemu-devel@nongnu.org; Sun, 21 Sep 2008 12:08:40 -0400 Received: by wf-out-1314.google.com with SMTP id 27so1229185wfd.4 for ; Sun, 21 Sep 2008 09:08:36 -0700 (PDT) Message-ID: Date: Sun, 21 Sep 2008 19:08:35 +0300 From: "Blue Swirl" Subject: Re: [Qemu-devel] [5281] Use the new concat_i32_i64 op for std and stda In-Reply-To: <200809211601.35191.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200809211601.35191.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org On 9/21/08, Paul Brook wrote: > On Sunday 21 September 2008, Blue Swirl wrote: > > + r_low = tcg_temp_new(TCG_TYPE_I32); > > + tcg_gen_trunc_tl_i32(r_low, cpu_tmp0); > > + tcg_gen_trunc_tl_i32(cpu_tmp32, hi); > > + tcg_gen_concat_i32_i64(cpu_tmp64, r_low, cpu_tmp32); > > + tcg_temp_free(r_low); > > > It's more efficient to not use concat_i32_i64 on 64-bit targets. > See patch below. I'll let you decide if you want to apply or ignore it. Good point. How about adding instead a concat_i64_i64 starting from this piece: > + tcg_gen_shli_i64(dest, high, 32); > + tcg_gen_ext32u_i64(low, low); > + tcg_gen_or_i64(dest, dest, low); and also add defines for concat_tl_i64? That would be both clean and efficient. I think ldd on i386 would benefit from a reverse operation (64 to two 32/64 bit words).