All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org
Subject: [Qemu-devel] [PULL 6/8] tcg: Rename tcg-target.c to tcg-target.inc.c
Date: Tue, 23 Feb 2016 10:33:07 -0800	[thread overview]
Message-ID: <1456252389-4416-7-git-send-email-rth@twiddle.net> (raw)
In-Reply-To: <1456252389-4416-1-git-send-email-rth@twiddle.net>

From: Peter Maydell <peter.maydell@linaro.org>

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 <eblake@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <1456238983-10160-2-git-send-email-peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 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%)

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
-- 
2.5.0

  parent reply	other threads:[~2016-02-23 18:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-23 18:33 [Qemu-devel] [PULL 0/8] tcg queued patches Richard Henderson
2016-02-23 18:33 ` [Qemu-devel] [PULL 1/8] tcg: Work around clang bug wrt enum ranges, part 2 Richard Henderson
2016-02-23 18:33 ` [Qemu-devel] [PULL 2/8] tcg: Implement indirect memory registers Richard Henderson
2016-02-23 18:33 ` [Qemu-devel] [PULL 3/8] tcg: Allocate indirect_base temporaries in a different order Richard Henderson
2016-02-23 18:33 ` [Qemu-devel] [PULL 4/8] target-sparc: Tidy global register initialization Richard Henderson
2016-02-23 18:33 ` [Qemu-devel] [PULL 5/8] target-sparc: Use global registers for the register window Richard Henderson
2016-06-14 21:52   ` Mark Cave-Ayland
2016-06-16 20:26     ` Richard Henderson
2016-06-16 21:53       ` Mark Cave-Ayland
2016-06-24  3:57         ` Richard Henderson
2016-06-24  6:36           ` Paolo Bonzini
2016-06-24  8:12             ` Peter Maydell
2016-06-24  8:16               ` Paolo Bonzini
2016-06-24 10:42             ` Mark Cave-Ayland
2016-06-24 12:03               ` Paolo Bonzini
2016-06-24 12:35                 ` Artyom Tarasenko
2016-02-23 18:33 ` Richard Henderson [this message]
2016-02-23 18:33 ` [Qemu-devel] [PULL 7/8] scripts/clean-includes: Ignore .inc.c files Richard Henderson
2016-02-23 18:33 ` [Qemu-devel] [PULL 8/8] tcg: Remove unnecessary osdep.h includes from tcg-target.inc.c Richard Henderson
2016-02-25  9:47 ` [Qemu-devel] [PULL 0/8] tcg queued patches Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1456252389-4416-7-git-send-email-rth@twiddle.net \
    --to=rth@twiddle.net \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.