From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBT4z-0006zT-Ik for qemu-devel@nongnu.org; Tue, 11 Sep 2012 12:12:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TBT4r-0006Tf-Ro for qemu-devel@nongnu.org; Tue, 11 Sep 2012 12:12:49 -0400 Received: from mail-vc0-f173.google.com ([209.85.220.173]:61288) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBT4r-0006TX-OG for qemu-devel@nongnu.org; Tue, 11 Sep 2012 12:12:41 -0400 Received: by vcbfl15 with SMTP id fl15so829992vcb.4 for ; Tue, 11 Sep 2012 09:12:40 -0700 (PDT) Sender: Richard Henderson Message-ID: <504F62F5.2090302@twiddle.net> Date: Tue, 11 Sep 2012 09:12:37 -0700 From: Richard Henderson MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] TCG questions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Xin Tong Cc: qemu-devel On 09/10/2012 08:17 PM, Xin Tong wrote: > I have 2 questions about TCGv. > > 1. if DEBUG is enabled on TCGv, TCGv is wrapped in a C struct. and > would it not be very expensive to pass TCGv by copy for all the > tcg_gen_xxx functions.i.e. tcg_gen_mov_tl(cpu_cc_src, cpu_T[1]); No. The compiler is (generally) able to look through a struct with a single member. > 2. I have created some files that need to include tcg-op.h and cpu.h ( > i use TCGv in the files). since cpu.h are architecture specific. what > do i put as the include path and how i should organize the files so > that the correct architecture specific cpu.h gets picked up. i tried > many things. but it seems none of them works very well. You've not provided enough details to give a meaningful answer. r~