From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KZIfV-0008IN-9v for qemu-devel@nongnu.org; Sat, 30 Aug 2008 01:06:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KZIfT-0008I2-CA for qemu-devel@nongnu.org; Sat, 30 Aug 2008 01:06:36 -0400 Received: from [199.232.76.173] (port=38517 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KZIfT-0008Hx-2w for qemu-devel@nongnu.org; Sat, 30 Aug 2008 01:06:35 -0400 Received: from wf-out-1314.google.com ([209.85.200.174]:55422) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KZIfS-0002yk-Ka for qemu-devel@nongnu.org; Sat, 30 Aug 2008 01:06:34 -0400 Received: by wf-out-1314.google.com with SMTP id 27so1061314wfd.4 for ; Fri, 29 Aug 2008 22:06:33 -0700 (PDT) Message-ID: Date: Sat, 30 Aug 2008 08:06:33 +0300 From: "Blue Swirl" Subject: Re: [Qemu-devel] [5112] SH4: convert a few helpers to TCG In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Sat, Aug 30, 2008 at 2:01 AM, Aurelien Jarno wrote: > case 0xc300: /* trapa #imm */ > - CHECK_NOT_DELAY_SLOT tcg_gen_movi_i32(cpu_pc, ctx->pc); > - gen_op_trapa(B7_0); > + CHECK_NOT_DELAY_SLOT > + tcg_gen_movi_i32(cpu_pc, ctx->pc); > + tcg_gen_movi_i32(cpu_T[0], B7_0); > + tcg_gen_helper_0_1(helper_trapa, cpu_T[0]); Instead of introducing new uses of cpu_T[0], which you will probably eliminate in the end of conversion, you could pass B7_0 using a tcg_const temporary variable.