From patchwork Tue Feb 23 18:33:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 62752 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1983769lbl; Tue, 23 Feb 2016 10:36:35 -0800 (PST) X-Received: by 10.140.27.174 with SMTP id 43mr42967101qgx.67.1456252595517; Tue, 23 Feb 2016 10:36:35 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id t81si15424332qki.64.2016.02.23.10.36.35 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 23 Feb 2016 10:36:35 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dkim=fail header.i=@gmail.com Received: from localhost ([::1]:59253 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYHp4-0005My-UC for patch@linaro.org; Tue, 23 Feb 2016 13:36:34 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37601) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYHmT-0001WY-8j for qemu-devel@nongnu.org; Tue, 23 Feb 2016 13:33:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYHmQ-0001Kl-0S for qemu-devel@nongnu.org; Tue, 23 Feb 2016 13:33:53 -0500 Received: from mail-qg0-x22d.google.com ([2607:f8b0:400d:c04::22d]:36443) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYHmP-0001Kg-R1 for qemu-devel@nongnu.org; Tue, 23 Feb 2016 13:33:49 -0500 Received: by mail-qg0-x22d.google.com with SMTP id y9so145104683qgd.3 for ; Tue, 23 Feb 2016 10:33:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=C2ddrXk9c+N9UsRxcTKQsXbe0asAP4mmRGQHWMq114w=; b=RoYaF8UCG4gmUOKhS2GQ+J0kvFhrrT67sQwHpYpRERgUZl+TrF8IIdhnmzGOEwBX55 VJTkTCIo51vT8r0xG7r8h+E2q7l1xPvyrb3bf9L4TPxi2zR7CL8x/aV2BKP2ZJP5U8ov hFiXkJi7PKYc4QVZ5X//Jl6/sxeE+aulkaFbP0btvWgfp1x2rKA4wsuM7MY/6DiyLgiB 2AnlwULpYYTyEdvONmi4GH4a6zqwzdgc0iCaDs7GMbWQLWkgIEsaD82UfD1ND7BgDdn0 Yd7u8VLd4rhfopA7dQ862Dv+lh0z4nlM9+XYcIInOT0EiFx/2mYK9qQNgfuuNnFjhYRD mVnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=C2ddrXk9c+N9UsRxcTKQsXbe0asAP4mmRGQHWMq114w=; b=ZRu1JJwfYW0PMTKeCByHIFAFQUh2KBc01ps4QCDccJ1dfOS0tME8vClNJSJJWO20rJ iVICj0qCWx8Z5W2zBW8NziYUNXtwkW1T12kfbzjHPkjeHFciRwq9jMyvL5Aod8JJVP2q AnYmSesoBC6MeAbHUctFKBjn3Z5DnIAg6FQKmnqm34+tut6FQFEky78zs8gJRpfHesW4 kgeTV1mkSbujP3xg6qkGrm7Z3pucx/KElrMmHWFT1zd9nnYPc4VenqpVnla1rdRW4E4h vBQk2cy/h+jFhfQNwSbVmuLneTfWC1GKFZp4Sl8aogMguDwO0iyy/4gbdf47XsXmZa3J lDYw== X-Gm-Message-State: AG10YORIVjoqGQk6jlxU0ffrbFt55D0+4KPYiMi0no0F0WpHS/g71CzN2oXcG7was/LfHA== X-Received: by 10.140.150.66 with SMTP id 63mr45307002qhw.91.1456252429416; Tue, 23 Feb 2016 10:33:49 -0800 (PST) Received: from anchor.com (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by smtp.gmail.com with ESMTPSA id 3sm8920181qgy.43.2016.02.23.10.33.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Feb 2016 10:33:49 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 23 Feb 2016 10:33:07 -0800 Message-Id: <1456252389-4416-7-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1456252389-4416-1-git-send-email-rth@twiddle.net> References: <1456252389-4416-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c04::22d Cc: peter.maydell@linaro.org Subject: [Qemu-devel] [PULL 6/8] tcg: Rename tcg-target.c to tcg-target.inc.c X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Peter Maydell Rename the per-architecture tcg-target.c files to tcg-target.inc.c. This makes it clearer that they are not intended to be standalone C files, but are instead #included into another source file. Reviewed-by: Eric Blake Signed-off-by: Peter Maydell Message-Id: <1456238983-10160-2-git-send-email-peter.maydell@linaro.org> Signed-off-by: Richard Henderson --- qemu-tech.texi | 2 +- tcg/README | 5 +++-- tcg/aarch64/{tcg-target.c => tcg-target.inc.c} | 0 tcg/arm/{tcg-target.c => tcg-target.inc.c} | 0 tcg/i386/{tcg-target.c => tcg-target.inc.c} | 0 tcg/ia64/{tcg-target.c => tcg-target.inc.c} | 0 tcg/mips/{tcg-target.c => tcg-target.inc.c} | 0 tcg/ppc/{tcg-target.c => tcg-target.inc.c} | 0 tcg/s390/{tcg-target.c => tcg-target.inc.c} | 0 tcg/sparc/{tcg-target.c => tcg-target.inc.c} | 0 tcg/tcg.c | 7 ++++--- tcg/tcg.h | 2 +- tcg/tci/README | 4 ++-- tcg/tci/{tcg-target.c => tcg-target.inc.c} | 0 14 files changed, 11 insertions(+), 9 deletions(-) rename tcg/aarch64/{tcg-target.c => tcg-target.inc.c} (100%) rename tcg/arm/{tcg-target.c => tcg-target.inc.c} (100%) rename tcg/i386/{tcg-target.c => tcg-target.inc.c} (100%) rename tcg/ia64/{tcg-target.c => tcg-target.inc.c} (100%) rename tcg/mips/{tcg-target.c => tcg-target.inc.c} (100%) rename tcg/ppc/{tcg-target.c => tcg-target.inc.c} (100%) rename tcg/s390/{tcg-target.c => tcg-target.inc.c} (100%) rename tcg/sparc/{tcg-target.c => tcg-target.inc.c} (100%) rename tcg/tci/{tcg-target.c => tcg-target.inc.c} (100%) -- 2.5.0 diff --git a/qemu-tech.texi b/qemu-tech.texi index 022017d..bdb2285 100644 --- a/qemu-tech.texi +++ b/qemu-tech.texi @@ -385,7 +385,7 @@ ops (see @code{target-i386/translate.c}). Some optimizations can be performed at this stage, including liveness analysis and trivial constant expression evaluation. TCG ops are then implemented in the host CPU back end, also known as TCG target (see -@code{tcg/i386/tcg-target.c}). For more information, please take a +@code{tcg/i386/tcg-target.inc.c}). For more information, please take a look at @code{tcg/README}. @node Condition code optimisations diff --git a/tcg/README b/tcg/README index 34c0775..f4a8ac1 100644 --- a/tcg/README +++ b/tcg/README @@ -460,8 +460,9 @@ function tcg_gen_xxx(args). 4) Backend -tcg-target.h contains the target specific definitions. tcg-target.c -contains the target specific code. +tcg-target.h contains the target specific definitions. tcg-target.inc.c +contains the target specific code; it is #included by tcg/tcg.c, rather +than being a standalone C file. 4.1) Assumptions diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.inc.c similarity index 100% rename from tcg/aarch64/tcg-target.c rename to tcg/aarch64/tcg-target.inc.c diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.inc.c similarity index 100% rename from tcg/arm/tcg-target.c rename to tcg/arm/tcg-target.inc.c diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.inc.c similarity index 100% rename from tcg/i386/tcg-target.c rename to tcg/i386/tcg-target.inc.c diff --git a/tcg/ia64/tcg-target.c b/tcg/ia64/tcg-target.inc.c similarity index 100% rename from tcg/ia64/tcg-target.c rename to tcg/ia64/tcg-target.inc.c diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.inc.c similarity index 100% rename from tcg/mips/tcg-target.c rename to tcg/mips/tcg-target.inc.c diff --git a/tcg/ppc/tcg-target.c b/tcg/ppc/tcg-target.inc.c similarity index 100% rename from tcg/ppc/tcg-target.c rename to tcg/ppc/tcg-target.inc.c diff --git a/tcg/s390/tcg-target.c b/tcg/s390/tcg-target.inc.c similarity index 100% rename from tcg/s390/tcg-target.c rename to tcg/s390/tcg-target.inc.c diff --git a/tcg/sparc/tcg-target.c b/tcg/sparc/tcg-target.inc.c similarity index 100% rename from tcg/sparc/tcg-target.c rename to tcg/sparc/tcg-target.inc.c diff --git a/tcg/tcg.c b/tcg/tcg.c index 86208a8..550671b 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -62,7 +62,8 @@ #include "elf.h" #include "exec/log.h" -/* Forward declarations for functions declared in tcg-target.c and used here. */ +/* Forward declarations for functions declared in tcg-target.inc.c and + used here. */ static void tcg_target_init(TCGContext *s); static void tcg_target_qemu_prologue(TCGContext *s); static void patch_reloc(tcg_insn_unit *code_ptr, int type, @@ -96,7 +97,7 @@ static void tcg_register_jit_int(void *buf, size_t size, size_t debug_frame_size) __attribute__((unused)); -/* Forward declarations for functions declared and used in tcg-target.c. */ +/* Forward declarations for functions declared and used in tcg-target.inc.c. */ static int target_parse_constraint(TCGArgConstraint *ct, const char **pct_str); static void tcg_out_ld(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg1, intptr_t arg2); @@ -250,7 +251,7 @@ TCGLabel *gen_new_label(void) return l; } -#include "tcg-target.c" +#include "tcg-target.inc.c" /* pool based memory allocation */ void *tcg_malloc_internal(TCGContext *s, int size) diff --git a/tcg/tcg.h b/tcg/tcg.h index d181694..c45329a 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -568,7 +568,7 @@ struct TCGContext { TBContext tb_ctx; - /* The TCGBackendData structure is private to tcg-target.c. */ + /* The TCGBackendData structure is private to tcg-target.inc.c. */ struct TCGBackendData *be; TCGTempSet free_temps[TCG_TYPE_COUNT * 2]; diff --git a/tcg/tci/README b/tcg/tci/README index dc57f07..3786b09 100644 --- a/tcg/tci/README +++ b/tcg/tci/README @@ -21,7 +21,7 @@ This is what TCI (Tiny Code Interpreter) does. 2) Implementation Like each TCG host frontend, TCI implements the code generator in -tcg-target.c, tcg-target.h. Both files are in directory tcg/tci. +tcg-target.inc.c, tcg-target.h. Both files are in directory tcg/tci. The additional file tcg/tci.c adds the interpreter. @@ -123,7 +123,7 @@ u1 = linux-user-test works would also improve speed for hosts which support byte alignment). * A better disassembler for the pseudo code would be nice (a very primitive - disassembler is included in tcg-target.c). + disassembler is included in tcg-target.inc.c). * It might be useful to have a runtime option which selects the native TCG or TCI, so QEMU would have to include two TCGs. Today, selecting TCI diff --git a/tcg/tci/tcg-target.c b/tcg/tci/tcg-target.inc.c similarity index 100% rename from tcg/tci/tcg-target.c rename to tcg/tci/tcg-target.inc.c