tcg: Include tcg files using tcg/ dirname, reduce cpp search path list
cover tcg: Include tcg files using tcg/ dirname, reduce cpp search path list
Noticed we could clean this while reviewing Richard patch last night:
https://www.mail-archive.com/[email protected]/msg667606.html
Philippe Mathieu-Daudé (2):
tcg: Search includes from the project root source directory
configure: Remove tcg/ from the preprocessor include search list
configure | 1 - include/exec/cpu_ldst.h | 2 +- tcg/i386/tcg-target.h | 2 +- tcg/tcg-op.h | 2 +- tcg/tcg.h | 4 ++-- accel/tcg/cpu-exec.c | 2 +- accel/tcg/tcg-runtime-gvec.c | 2 +- accel/tcg/translate-all.c | 2 +- accel/tcg/user-exec.c | 2 +- bsd-user/main.c | 2 +- cpus.c | 2 +- exec.c | 2 +- linux-user/main.c | 2 +- target/alpha/translate.c | 2 +- target/arm/helper-a64.c | 2 +- target/arm/translate-a64.c | 4 ++-- target/arm/translate-sve.c | 6 +++--- target/arm/translate.c | 4 ++-- target/cris/translate.c | 2 +- target/hppa/translate.c | 2 +- target/i386/mem_helper.c | 2 +- target/i386/translate.c | 2 +- target/lm32/translate.c | 2 +- target/m68k/translate.c | 2 +- target/microblaze/translate.c | 2 +- target/mips/translate.c | 2 +- target/moxie/translate.c | 2 +- target/nios2/translate.c | 2 +- target/openrisc/translate.c | 2 +- target/ppc/mem_helper.c | 2 +- target/ppc/translate.c | 4 ++-- target/riscv/cpu_helper.c | 2 +- target/riscv/translate.c | 2 +- target/s390x/translate.c | 4 ++-- target/sh4/translate.c | 2 +- target/sparc/ldst_helper.c | 2 +- target/sparc/translate.c | 2 +- target/tilegx/translate.c | 2 +- target/tricore/translate.c | 2 +- target/unicore32/translate.c | 2 +- target/xtensa/translate.c | 2 +- tcg/aarch64/tcg-target.inc.c | 4 ++-- tcg/arm/tcg-target.inc.c | 4 ++-- tcg/i386/tcg-target.inc.c | 4 ++-- tcg/mips/tcg-target.inc.c | 2 +- tcg/optimize.c | 2 +- tcg/ppc/tcg-target.inc.c | 4 ++-- tcg/riscv/tcg-target.inc.c | 4 ++-- tcg/s390/tcg-target.inc.c | 4 ++-- tcg/sparc/tcg-target.inc.c | 2 +- tcg/tcg-common.c | 2 +- tcg/tcg-op-gvec.c | 8 ++++---- tcg/tcg-op-vec.c | 6 +++--- tcg/tcg-op.c | 6 +++--- tcg/tcg.c | 2 +- tcg/tci.c | 2 +- 56 files changed, 75 insertions(+), 76 deletions(-)
Signature · 1 line
2.21.0
PATCH 1/2 tcg: Search includes from the project root source directory
We currently search both the root and the tcg/ directories for tcg files:
$ git grep '#include "tcg/' | wc -l 28
$ git grep '#include "tcg[^/]' | wc -l 94
To simplify the preprocessor search path, unify by expliciting the tcg/ directory.
Patch created mechanically by running:
$ for x in $(ls tcg/*.{c,h} | sed s,tcg/,,); do \
sed -i "s,#include \"$x\",#include \"tcg/$x\"," \
$(git grep -l "#include \"$x\""); \
done--- include/exec/cpu_ldst.h | 2 +- tcg/i386/tcg-target.h | 2 +- tcg/tcg-op.h | 2 +- tcg/tcg.h | 4 ++-- accel/tcg/cpu-exec.c | 2 +- accel/tcg/tcg-runtime-gvec.c | 2 +- accel/tcg/translate-all.c | 2 +- accel/tcg/user-exec.c | 2 +- bsd-user/main.c | 2 +- cpus.c | 2 +- exec.c | 2 +- linux-user/main.c | 2 +- target/alpha/translate.c | 2 +- target/arm/helper-a64.c | 2 +- target/arm/translate-a64.c | 4 ++-- target/arm/translate-sve.c | 6 +++--- target/arm/translate.c | 4 ++-- target/cris/translate.c | 2 +- target/hppa/translate.c | 2 +- target/i386/mem_helper.c | 2 +- target/i386/translate.c | 2 +- target/lm32/translate.c | 2 +- target/m68k/translate.c | 2 +- target/microblaze/translate.c | 2 +- target/mips/translate.c | 2 +- target/moxie/translate.c | 2 +- target/nios2/translate.c | 2 +- target/openrisc/translate.c | 2 +- target/ppc/mem_helper.c | 2 +- target/ppc/translate.c | 4 ++-- target/riscv/cpu_helper.c | 2 +- target/riscv/translate.c | 2 +- target/s390x/translate.c | 4 ++-- target/sh4/translate.c | 2 +- target/sparc/ldst_helper.c | 2 +- target/sparc/translate.c | 2 +- target/tilegx/translate.c | 2 +- target/tricore/translate.c | 2 +- target/unicore32/translate.c | 2 +- target/xtensa/translate.c | 2 +- tcg/aarch64/tcg-target.inc.c | 4 ++-- tcg/arm/tcg-target.inc.c | 4 ++-- tcg/i386/tcg-target.inc.c | 4 ++-- tcg/mips/tcg-target.inc.c | 2 +- tcg/optimize.c | 2 +- tcg/ppc/tcg-target.inc.c | 4 ++-- tcg/riscv/tcg-target.inc.c | 4 ++-- tcg/s390/tcg-target.inc.c | 4 ++-- tcg/sparc/tcg-target.inc.c | 2 +- tcg/tcg-common.c | 2 +- tcg/tcg-op-gvec.c | 8 ++++---- tcg/tcg-op-vec.c | 6 +++--- tcg/tcg-op.c | 6 +++--- tcg/tcg.c | 2 +- tcg/tci.c | 2 +- 55 files changed, 75 insertions(+), 75 deletions(-)
include/exec/cpu_ldst.h +1 -1
@@ -153,7 +153,7 @@ static inline void clear_helper_retaddr(void)#else /* The memory helpers for tcg-generated code need tcg_target_long etc. */ -#include "tcg.h" +#include "tcg/tcg.h" static inline target_ulong tlb_addr_write (const CPUTLBEntry *entry) {
tcg/i386/tcg-target.h +1 -1
@@ -223,7 +223,7 @@ static inline void tb_target_set_jmp_target(uintptr_t tc_ptr,* The x86 has a pretty strong memory ordering which only really * allows for some stores to be re-ordered after loads. */ -#include "tcg-mo.h" +#include "tcg/tcg-mo.h" #define TCG_TARGET_DEFAULT_MO (TCG_MO_ALL & ~TCG_MO_ST_LD)
tcg/tcg-op.h +1 -1
@@ -25,7 +25,7 @@#ifndef TCG_TCG_OP_H #define TCG_TCG_OP_H -#include "tcg.h" +#include "tcg/tcg.h" #include "exec/helper-proto.h" #include "exec/helper-gen.h"
tcg/tcg.h +2 -2
@@ -31,7 +31,7 @@#include "qemu/bitops.h" #include "qemu/plugin.h" #include "qemu/queue.h" -#include "tcg-mo.h" +#include "tcg/tcg-mo.h" #include "tcg-target.h" #include "qemu/int128.h"
@@ -211,7 +211,7 @@ typedef uint64_t TCGRegSet; typedef enum TCGOpcode { #define DEF(name, oargs, iargs, cargs, flags) INDEX_op_ ## name, -#include "tcg-opc.h" +#include "tcg/tcg-opc.h" #undef DEFNB_OPS , } TCGOpcode;
accel/tcg/cpu-exec.c +1 -1
@@ -23,7 +23,7 @@#include "trace.h" #include "disas/disas.h" #include "exec/exec-all.h" -#include "tcg.h" +#include "tcg/tcg.h" #include "qemu/atomic.h" #include "sysemu/qtest.h" #include "qemu/timer.h"
accel/tcg/tcg-runtime-gvec.c +1 -1
@@ -21,7 +21,7 @@#include "qemu/host-utils.h" #include "cpu.h" #include "exec/helper-proto.h" -#include "tcg-gvec-desc.h" +#include "tcg/tcg-gvec-desc.h" /* Virtually all hosts support 16-byte vectors. Those that don't can emulate
accel/tcg/translate-all.c +1 -1
@@ -25,7 +25,7 @@#include "trace.h" #include "disas/disas.h" #include "exec/exec-all.h" -#include "tcg.h" +#include "tcg/tcg.h" #if defined(CONFIG_USER_ONLY )#include "qemu.h" #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
accel/tcg/user-exec.c +1 -1
@@ -20,7 +20,7 @@#include "cpu.h" #include "disas/disas.h" #include "exec/exec-all.h" -#include "tcg.h" +#include "tcg/tcg.h" #include "qemu/bitops.h" #include "exec/cpu_ldst.h" #include "translate-all.h"
bsd-user/main.c +1 -1
@@ -33,7 +33,7 @@#include "qemu/module.h" #include "cpu.h" #include "exec/exec-all.h" -#include "tcg.h" +#include "tcg/tcg.h" #include "qemu/timer.h" #include "qemu/envlist.h" #include "exec/log.h"
cpus.c +1 -1
@@ -53,7 +53,7 @@#include "qemu/bitmap.h" #include "qemu/seqlock.h" #include "qemu/guest-random.h" -#include "tcg.h" +#include "tcg/tcg.h" #include "hw/nmi.h" #include "sysemu/replay.h" #include "sysemu/runstate.h"
exec.c +1 -1
@@ -25,7 +25,7 @@#include "cpu.h" #include "exec/exec-all.h" #include "exec/target_page.h" -#include "tcg.h" +#include "tcg/tcg.h" #include "hw/qdev-core.h" #include "hw/qdev-properties.h" #if !defined(CONFIG_USER_ONLY )
linux-user/main.c +1 -1
@@ -37,7 +37,7 @@#include "qemu/plugin.h" #include "cpu.h" #include "exec/exec-all.h" -#include "tcg.h" +#include "tcg/tcg.h" #include "qemu/timer.h" #include "qemu/envlist.h" #include "qemu/guest-random.h"
target/alpha/translate.c +1 -1
@@ -23,7 +23,7 @@#include "disas/disas.h" #include "qemu/host-utils.h" #include "exec/exec-all.h" -#include "tcg-op.h" +#include "tcg/tcg-op.h" #include "exec/cpu_ldst.h" #include "exec/helper-proto.h" #include "exec/helper-gen.h"
target/arm/helper-a64.c +1 -1
@@ -31,7 +31,7 @@#include "exec/cpu_ldst.h" #include "qemu/int128.h" #include "qemu/atomic128.h" -#include "tcg.h" +#include "tcg/tcg.h" #include "fpu/softfloat.h" #include <zlib.h> /* For crc32 */
target/arm/translate-a64.c +2 -2
@@ -20,8 +20,8 @@#include "cpu.h" #include "exec/exec-all.h" -#include "tcg-op.h" -#include "tcg-op-gvec.h" +#include "tcg/tcg-op.h" +#include "tcg/tcg-op-gvec.h" #include "qemu/log.h" #include "arm_ldst.h" #include "translate.h"
target/arm/translate-sve.c +3 -3
@@ -20,9 +20,9 @@#include "qemu/osdep.h" #include "cpu.h" #include "exec/exec-all.h" -#include "tcg-op.h" -#include "tcg-op-gvec.h" -#include "tcg-gvec-desc.h" +#include "tcg/tcg-op.h" +#include "tcg/tcg-op-gvec.h" +#include "tcg/tcg-gvec-desc.h" #include "qemu/log.h" #include "arm_ldst.h" #include "translate.h"
target/arm/translate.c +2 -2
@@ -24,8 +24,8 @@#include "internals.h" #include "disas/disas.h" #include "exec/exec-all.h" -#include "tcg-op.h" -#include "tcg-op-gvec.h" +#include "tcg/tcg-op.h" +#include "tcg/tcg-op-gvec.h" #include "qemu/log.h" #include "qemu/bitops.h" #include "arm_ldst.h"
target/cris/translate.c +1 -1
@@ -27,7 +27,7 @@#include "cpu.h" #include "disas/disas.h" #include "exec/exec-all.h" -#include "tcg-op.h" +#include "tcg/tcg-op.h" #include "exec/helper-proto.h" #include "mmu.h" #include "exec/cpu_ldst.h"
target/hppa/translate.c +1 -1
@@ -22,7 +22,7 @@#include "disas/disas.h" #include "qemu/host-utils.h" #include "exec/exec-all.h" -#include "tcg-op.h" +#include "tcg/tcg-op.h" #include "exec/cpu_ldst.h" #include "exec/helper-proto.h" #include "exec/helper-gen.h"
target/i386/mem_helper.c +1 -1
@@ -24,7 +24,7 @@#include "exec/cpu_ldst.h" #include "qemu/int128.h" #include "qemu/atomic128.h" -#include "tcg.h" +#include "tcg/tcg.h" void helper_cmpxchg8b_unlocked (CPUX86State *env,target_ulong a0) {
target/i386/translate.c +1 -1
@@ -22,7 +22,7 @@#include "cpu.h" #include "disas/disas.h" #include "exec/exec-all.h" -#include "tcg-op.h" +#include "tcg/tcg-op.h" #include "exec/cpu_ldst.h" #include "exec/translator.h"
target/lm32/translate.c +1 -1
@@ -23,7 +23,7 @@#include "exec/helper-proto.h" #include "exec/exec-all.h" #include "exec/translator.h" -#include "tcg-op.h" +#include "tcg/tcg-op.h" #include "qemu/qemu-print.h" #include "exec/cpu_ldst.h"
target/m68k/translate.c +1 -1
@@ -22,7 +22,7 @@#include "cpu.h" #include "disas/disas.h" #include "exec/exec-all.h" -#include "tcg-op.h" +#include "tcg/tcg-op.h" #include "qemu/log.h" #include "qemu/qemu-print.h" #include "exec/cpu_ldst.h"
target/microblaze/translate.c +1 -1
@@ -22,7 +22,7 @@#include "cpu.h" #include "disas/disas.h" #include "exec/exec-all.h" -#include "tcg-op.h" +#include "tcg/tcg-op.h" #include "exec/helper-proto.h" #include "microblaze-decode.h" #include "exec/cpu_ldst.h"
target/mips/translate.c +1 -1
@@ -26,7 +26,7 @@#include "internal.h" #include "disas/disas.h" #include "exec/exec-all.h" -#include "tcg-op.h" +#include "tcg/tcg-op.h" #include "exec/cpu_ldst.h" #include "hw/mips/cpudevs.h"
target/moxie/translate.c +1 -1
@@ -26,7 +26,7 @@#include "cpu.h" #include "exec/exec-all.h" #include "disas/disas.h" -#include "tcg-op.h" +#include "tcg/tcg-op.h" #include "exec/cpu_ldst.h" #include "qemu/qemu-print.h"
target/nios2/translate.c +1 -1
@@ -23,7 +23,7 @@#include "qemu/osdep.h" #include "cpu.h" -#include "tcg-op.h" +#include "tcg/tcg-op.h" #include "exec/exec-all.h" #include "disas/disas.h" #include "exec/helper-proto.h"
target/openrisc/translate.c +1 -1
@@ -22,7 +22,7 @@#include "cpu.h" #include "exec/exec-all.h" #include "disas/disas.h" -#include "tcg-op.h" +#include "tcg/tcg-op.h" #include "qemu/log.h" #include "qemu/bitops.h" #include "qemu/qemu-print.h"
target/ppc/mem_helper.c +1 -1
@@ -25,7 +25,7 @@#include "exec/helper-proto.h" #include "helper_regs.h" #include "exec/cpu_ldst.h" -#include "tcg.h" +#include "tcg/tcg.h" #include "internal.h" #include "qemu/atomic128.h"
target/ppc/translate.c +2 -2
@@ -23,8 +23,8 @@#include "internal.h" #include "disas/disas.h" #include "exec/exec-all.h" -#include "tcg-op.h" -#include "tcg-op-gvec.h" +#include "tcg/tcg-op.h" +#include "tcg/tcg-op-gvec.h" #include "qemu/host-utils.h" #include "qemu/main-loop.h" #include "exec/cpu_ldst.h"
target/riscv/cpu_helper.c +1 -1
@@ -22,7 +22,7 @@#include "qemu/main-loop.h" #include "cpu.h" #include "exec/exec-all.h" -#include "tcg-op.h" +#include "tcg/tcg-op.h" #include "trace.h" int riscv_cpu_mmu_index (CPURISCVState *env,bool ifetch)
target/riscv/translate.c +1 -1
@@ -19,7 +19,7 @@#include "qemu/osdep.h" #include "qemu/log.h" #include "cpu.h" -#include "tcg-op.h" +#include "tcg/tcg-op.h" #include "disas/disas.h" #include "exec/cpu_ldst.h" #include "exec/exec-all.h"
target/s390x/translate.c +2 -2
@@ -33,8 +33,8 @@#include "internal.h" #include "disas/disas.h" #include "exec/exec-all.h" -#include "tcg-op.h" -#include "tcg-op-gvec.h" +#include "tcg/tcg-op.h" +#include "tcg/tcg-op-gvec.h" #include "qemu/log.h" #include "qemu/host-utils.h" #include "exec/cpu_ldst.h"
target/sh4/translate.c +1 -1
@@ -23,7 +23,7 @@#include "cpu.h" #include "disas/disas.h" #include "exec/exec-all.h" -#include "tcg-op.h" +#include "tcg/tcg-op.h" #include "exec/cpu_ldst.h" #include "exec/helper-proto.h" #include "exec/helper-gen.h"
target/sparc/ldst_helper.c +1 -1
@@ -19,7 +19,7 @@#include "qemu/osdep.h" #include "cpu.h" -#include "tcg.h" +#include "tcg/tcg.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" #include "exec/cpu_ldst.h"
target/sparc/translate.c +1 -1
@@ -24,7 +24,7 @@#include "disas/disas.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" -#include "tcg-op.h" +#include "tcg/tcg-op.h" #include "exec/cpu_ldst.h" #include "exec/helper-gen.h"
target/tilegx/translate.c +1 -1
@@ -24,7 +24,7 @@#include "exec/log.h" #include "disas/disas.h" #include "exec/exec-all.h" -#include "tcg-op.h" +#include "tcg/tcg-op.h" #include "exec/cpu_ldst.h" #include "linux-user/syscall_defs.h"
target/tricore/translate.c +1 -1
@@ -22,7 +22,7 @@#include "cpu.h" #include "disas/disas.h" #include "exec/exec-all.h" -#include "tcg-op.h" +#include "tcg/tcg-op.h" #include "exec/cpu_ldst.h" #include "qemu/qemu-print.h"
target/unicore32/translate.c +1 -1
@@ -13,7 +13,7 @@#include "cpu.h" #include "disas/disas.h" #include "exec/exec-all.h" -#include "tcg-op.h" +#include "tcg/tcg-op.h" #include "qemu/log.h" #include "exec/cpu_ldst.h" #include "exec/translator.h"
target/xtensa/translate.c +1 -1
@@ -33,7 +33,7 @@#include "cpu.h" #include "exec/exec-all.h" #include "disas/disas.h" -#include "tcg-op.h" +#include "tcg/tcg-op.h" #include "qemu/log.h" #include "qemu/qemu-print.h" #include "exec/cpu_ldst.h"
tcg/aarch64/tcg-target.inc.c +2 -2
@@ -10,7 +10,7 @@* See the COPYING file in the top-level directory for details. */ -#include "tcg-pool.inc.c" +#include "tcg/tcg-pool.inc.c" #include "qemu/bitops.h" /* We're going to re-use TCGType in setting of the SF bit, which controls
@@ -1541,7 +1541,7 @@ static void tcg_out_cltz(TCGContext *s, TCGType ext, TCGReg d, }#ifdef CONFIG_SOFTMMU -#include "tcg-ldst.inc.c" +#include "tcg/tcg-ldst.inc.c" /* helper signature: helper_ret_ld_mmu(CPUState *env, target_ulong addr, * TCGMemOpIdx oi, uintptr_t ra)
tcg/arm/tcg-target.inc.c +2 -2
@@ -23,7 +23,7 @@*/ #include "elf.h" -#include "tcg-pool.inc.c" +#include "tcg/tcg-pool.inc.c" int arm_arch = __ARM_ARCH;
@@ -1131,7 +1131,7 @@ static TCGCond tcg_out_cmp2(TCGContext *s, const TCGArg *args, }#ifdef CONFIG_SOFTMMU -#include "tcg-ldst.inc.c" +#include "tcg/tcg-ldst.inc.c" /* helper signature: helper_ret_ld_mmu(CPUState *env, target_ulong addr, * int mmu_idx, uintptr_t ra)
tcg/i386/tcg-target.inc.c +2 -2
@@ -22,7 +22,7 @@* THE SOFTWARE. */ -#include "tcg-pool.inc.c" +#include "tcg/tcg-pool.inc.c" #ifdef CONFIG_DEBUG_TCG static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = {
@@ -1647,7 +1647,7 @@ static void tcg_out_nopn(TCGContext *s, int n) }#if defined(CONFIG_SOFTMMU ) -#include "tcg-ldst.inc.c" +#include "tcg/tcg-ldst.inc.c" /* helper signature: helper_ret_ld_mmu(CPUState *env, target_ulong addr, * int mmu_idx, uintptr_t ra)
tcg/mips/tcg-target.inc.c +1 -1
@@ -1107,7 +1107,7 @@ static void tcg_out_call(TCGContext *s, tcg_insn_unit *arg) }#if defined(CONFIG_SOFTMMU ) -#include "tcg-ldst.inc.c" +#include "tcg/tcg-ldst.inc.c" static void *const qemu_ld_helpers[16 ] = { [MO_UB] = helper_ret_ldub_mmu,
tcg/optimize.c +1 -1
@@ -24,7 +24,7 @@*/ #include "qemu/osdep.h" -#include "tcg-op.h" +#include "tcg/tcg-op.h" #define CASE_OP_32_64 (x) \ glue(glue(case INDEX_op_, x), _i32): \
tcg/ppc/tcg-target.inc.c +2 -2
@@ -23,7 +23,7 @@*/ #include "elf.h" -#include "tcg-pool.inc.c" +#include "tcg/tcg-pool.inc.c" #if defined _CALL_DARWIN || defined __APPLE__#define TCG_TARGET_CALL_DARWIN
@@ -1845,7 +1845,7 @@ static const uint32_t qemu_exts_opc[4] = { };#if defined (CONFIG_SOFTMMU ) -#include "tcg-ldst.inc.c" +#include "tcg/tcg-ldst.inc.c" /* helper signature: helper_ld_mmu(CPUState *env, target_ulong addr, * int mmu_idx, uintptr_t ra)
tcg/riscv/tcg-target.inc.c +2 -2
@@ -27,7 +27,7 @@* THE SOFTWARE. */ -#include "tcg-pool.inc.c" +#include "tcg/tcg-pool.inc.c" #ifdef CONFIG_DEBUG_TCG static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = {
@@ -921,7 +921,7 @@ static void tcg_out_mb(TCGContext *s, TCGArg a0)*/ #if defined(CONFIG_SOFTMMU ) -#include "tcg-ldst.inc.c" +#include "tcg/tcg-ldst.inc.c" /* helper signature: helper_ret_ld_mmu(CPUState *env, target_ulong addr, * TCGMemOpIdx oi, uintptr_t ra)
tcg/s390/tcg-target.inc.c +2 -2
@@ -29,7 +29,7 @@#error "unsupported code generation mode"#endif -#include "tcg-pool.inc.c" +#include "tcg/tcg-pool.inc.c" #include "elf.h" /* ??? The translation blocks produced by TCG are generally small enough to
@@ -1536,7 +1536,7 @@ static void tcg_out_qemu_st_direct(TCGContext *s, MemOp opc, TCGReg data, }#if defined(CONFIG_SOFTMMU ) -#include "tcg-ldst.inc.c" +#include "tcg/tcg-ldst.inc.c" /* We're expecting to use a 20-bit negative offset on the tlb memory ops. */ QEMU_BUILD_BUG_ON (TLB_MASK_TABLE_OFS (0 ) >0 );
tcg/sparc/tcg-target.inc.c +1 -1
@@ -22,7 +22,7 @@* THE SOFTWARE. */ -#include "tcg-pool.inc.c" +#include "tcg/tcg-pool.inc.c" #ifdef CONFIG_DEBUG_TCG static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = {
tcg/tcg-common.c +1 -1
@@ -32,7 +32,7 @@ uintptr_t tci_tb_ptr; TCGOpDef tcg_op_defs[] = { #define DEF(s, oargs, iargs, cargs, flags) \ { #s, oargs, iargs, cargs, iargs + oargs + cargs, flags }, -#include "tcg-opc.h" +#include "tcg/tcg-opc.h" #undef DEF };const size_t tcg_op_defs_max =ARRAY_SIZE (tcg_op_defs);
tcg/tcg-op-gvec.c +4 -4
@@ -18,11 +18,11 @@*/ #include "qemu/osdep.h" -#include "tcg.h" -#include "tcg-op.h" -#include "tcg-op-gvec.h" +#include "tcg/tcg.h" +#include "tcg/tcg-op.h" +#include "tcg/tcg-op-gvec.h" #include "qemu/main-loop.h" -#include "tcg-gvec-desc.h" +#include "tcg/tcg-gvec-desc.h" #define MAX_UNROLL 4
tcg/tcg-op-vec.c +3 -3
@@ -19,9 +19,9 @@#include "qemu/osdep.h" #include "cpu.h" -#include "tcg.h" -#include "tcg-op.h" -#include "tcg-mo.h" +#include "tcg/tcg.h" +#include "tcg/tcg-op.h" +#include "tcg/tcg-mo.h" /* Reduce the number of ifdefs below. This assumes that all uses of TCGV_HIGH and TCGV_LOW are properly protected by a conditional that
tcg/tcg-op.c +3 -3
@@ -25,9 +25,9 @@#include "qemu/osdep.h" #include "cpu.h" #include "exec/exec-all.h" -#include "tcg.h" -#include "tcg-op.h" -#include "tcg-mo.h" +#include "tcg/tcg.h" +#include "tcg/tcg-op.h" +#include "tcg/tcg-mo.h" #include "trace-tcg.h" #include "trace/mem.h" #include "exec/plugin-gen.h"
tcg/tcg.c +1 -1
@@ -48,7 +48,7 @@#include "hw/boards.h" #endif -#include "tcg-op.h" +#include "tcg/tcg-op.h" #if UINTPTR_MAX ==UINT32_MAX # define ELF_CLASS ELFCLASS32
tcg/tci.c +1 -1
@@ -30,7 +30,7 @@#include "qemu-common.h" #include "tcg/tcg.h" /* MAX_OPC_PARAM_IARGS */ #include "exec/cpu_ldst.h" -#include "tcg-op.h" +#include "tcg/tcg-op.h" /* Marker for missing code. */ #define TODO () \
Signature · 1 line
2.21.0
Re: [PATCH 1/2] tcg: Search includes from the project root source directory
Am 30.12.19 um 10:08 schrieb Philippe Mathieu-Daudé:
[...]
Quoted 8 lines
tcg/tcg-op.h | 2 +- tcg/tcg.h | 4 ++-- tcg/tcg-common.c | 2 +- tcg/tcg-op-gvec.c | 8 ++++---- tcg/tcg-op-vec.c | 6 +++--- tcg/tcg-op.c | 6 +++--- tcg/tcg.c | 2 +- tcg/tci.c | 2 +-
Source files in the tcg directory should not need any change because they find include files in the same directory without searching.
If we add a tcg/ include file prefix for them as well, that has the advantage that it might look prettier and more uniform, but it has the disadvantage of requiring a search by the preprocessor.
I'd prefer not changing those files.
Regards and best wished for 2020
Stefan
Re: [PATCH 1/2] tcg: Search includes from the project root source directory
Hi Stefan,
Quoted 14 lines · Stefan Weil
Am 30.12.19 um 10:08 schrieb Philippe Mathieu-Daudé:
[...]
Quoted 8 lines
tcg/tcg-op.h | 2 +- tcg/tcg.h | 4 ++-- tcg/tcg-common.c | 2 +- tcg/tcg-op-gvec.c | 8 ++++---- tcg/tcg-op-vec.c | 6 +++--- tcg/tcg-op.c | 6 +++--- tcg/tcg.c | 2 +- tcg/tci.c | 2 +-
Quoted 6 lines
Source files in the tcg directory should not need any change because they find include files in the same directory without searching.
If we add a tcg/ include file prefix for them as well, that has the advantage that it might look prettier and more uniform, but it has the disadvantage of requiring a search by the preprocessor.
Yeah, I was not sure about these specific files. My first attempt was without modifying them, but then I thought it would be better to keep the codebase uniform, as you said.
Quoted 2 lines
I'd prefer not changing those files.
OK, I'll wait to see what Richard/Markus prefer.
Quoted 1 line
Regards and best wished for 2020
Thanks ;)
Re: [PATCH 1/2] tcg: Search includes from the project root source directory
Il lun 30 dic 2019, 09:59 Philippe Mathieu-Daudé <[email protected]> ha scritto:
Quoted 4 lines
Quoted 1 line
I'd prefer not changing those files.
OK, I'll wait to see what Richard/Markus prefer.
I think it's best if you keep the include directives as-is for files only needed from tcg/, and move the other headers (those that are needed from other directories only) to include/tcg.
Thanks and happy new year!
Paolo
Quoted 6 lines
Quoted 2 lines
Regards and best wished for 2020
Thanks ;)
Re: [PATCH 1/2] tcg: Search includes from the project root source directory
Quoted 10 lines · Paolo Bonzini
Il lun 30 dic 2019, 09:59 Philippe Mathieu-Daudé <[email protected] <mailto:[email protected]>> ha scritto:
> I'd prefer not changing those files.
OK, I'll wait to see what Richard/Markus prefer.
I think it's best if you keep the include directives as-is for files only needed from tcg/, and move the other headers (those that are needed from other directories only) to
include/tcg.
I thought moving headers to include/tcg would diverge too much from libtcg, but this project already did it, so why not:
https://github.com/S2E/libtcg/tree/master/include/tcg
Re: [PATCH 1/2] tcg: Search includes from the project root source directory
Quoted 4 lines · Philippe Mathieu-Daudé
Quoted 3 lines · Paolo Bonzini
Il lun 30 dic 2019, 09:59 Philippe Mathieu-Daudé <[email protected] <mailto:[email protected]>> ha scritto:
Quoted 8 lines
Quoted 8 lines
> I'd prefer not changing those files.
OK, I'll wait to see what Richard/Markus prefer.
I think it's best if you keep the include directives as-is for files only needed from tcg/, and move the other headers (those that are needed from other directories only) to
include/tcg.
Assuming we don't want to add include/tcg/ in the path search list, we still need to update the tcg/*.c include directives to use "tcg/":
tcg/tcg-op-gvec.c:21:10: fatal error: tcg.h: No such file or directory
21 | #include "tcg.h"
| ^~~~~~~
compilation terminated.
make[1]: *** [rules.mak:69: tcg/tcg-op-gvec.o] Error 1 make[1]: *** Waiting for unfinished jobs....
CC mips64el-softmmu/accel/tcg/translate-all.otcg/optimize.c:27:10: fatal error: tcg-op.h: No such file or directory
27 | #include "tcg-op.h"
| ^~~~~~~~~~
compilation terminated.
make[1]: *** [rules.mak:69: tcg/optimize.o] Error 1 tcg/tcg-op-vec.c:22:10: fatal error: tcg.h: No such file or directory
22 | #include "tcg.h"
| ^~~~~~~
compilation terminated.
make[1]: *** [rules.mak:69: tcg/tcg-op-vec.o] Error 1 tcg/tcg-common.c:35:10: fatal error: tcg-opc.h: No such file or directory
35 | #include "tcg-opc.h"
| ^~~~~~~~~~~
compilation terminated.
make[1]: *** [rules.mak:69: tcg/tcg-common.o] Error 1 tcg/tcg-op.c:28:10: fatal error: tcg.h: No such file or directory
28 | #include "tcg.h"
| ^~~~~~~
compilation terminated.
make[1]: *** [rules.mak:69: tcg/tcg-op.o] Error 1 tcg/tcg.c:51:10: fatal error: tcg-op.h: No such file or directory
51 | #include "tcg-op.h"
| ^~~~~~~~~~
compilation terminated.
Quoted 3 lines
I thought moving headers to
include/tcgwould diverge too much from libtcg, but this project already did it, so why not:
https://github.com/S2E/libtcg/tree/master/include/tcg
Re: [PATCH 1/2] tcg: Search includes from the project root source directory
Yes, of course (I thought it would be clear from the message, but perhaps it was a bit implicit).
Paolo
Il lun 30 dic 2019, 16:48 Philippe Mathieu-Daudé <[email protected]> ha scritto:
Quoted 56 lines
Quoted 11 lines · Philippe Mathieu-Daudé
Quoted 10 lines · Paolo Bonzini
Il lun 30 dic 2019, 09:59 Philippe Mathieu-Daudé <[email protected] <mailto:[email protected]>> ha scritto:
> I'd prefer not changing those files.
OK, I'll wait to see what Richard/Markus prefer.
I think it's best if you keep the include directives as-is for files only needed from tcg/, and move the other headers (those that are
needed
Quoted 1 line
Quoted 1 line
from other directories only) to
include/tcg.Assuming we don't want to add
include/tcg/in the path search list, we still need to update the tcg/*.c include directives to use "tcg/":
tcg/tcg-op-gvec.c:21:10: fatal error:tcg.h: No such file or directory
21 | #include "tcg.h"| ^~~~~~~compilation terminated.
make[1]: *** [rules.mak:69:tcg/tcg-op-gvec.o] Error 1 make[1]: *** Waiting for unfinished jobs....
CCmips64el-softmmu/accel/tcg/translate-all.otcg/optimize.c:27:10: fatal error:tcg-op.h: No such file or directory
27 | #include "tcg-op.h"| ^~~~~~~~~~compilation terminated.
make[1]: *** [rules.mak:69:tcg/optimize.o] Error 1tcg/tcg-op-vec.c:22:10: fatal error:tcg.h: No such file or directory
22 | #include "tcg.h"| ^~~~~~~compilation terminated.
make[1]: *** [rules.mak:69:tcg/tcg-op-vec.o] Error 1tcg/tcg-common.c:35:10: fatal error:tcg-opc.h: No such file or directory
35 | #include "tcg-opc.h"| ^~~~~~~~~~~compilation terminated.
make[1]: *** [rules.mak:69:tcg/tcg-common.o] Error 1tcg/tcg-op.c:28:10: fatal error:tcg.h: No such file or directory
28 | #include "tcg.h"| ^~~~~~~compilation terminated.
make[1]: *** [rules.mak:69:tcg/tcg-op.o] Error 1tcg/tcg.c:51:10: fatal error:tcg-op.h: No such file or directory
51 | #include "tcg-op.h"| ^~~~~~~~~~compilation terminated.
Quoted 3 lines
I thought moving headers to
include/tcgwould diverge too much from libtcg, but this project already did it, so why not:
https://github.com/S2E/libtcg/tree/master/include/tcg
PATCH 2/2 configure: Remove tcg/ from the preprocessor include search list
In reply to Philippe Mathieu-DaudéAll tcg includes are relative to the repository root directory, we can safely remove the tcg/ directory from the include search path list.
--- configure | 1 - 1 file changed, 1 deletion(-)
configure +0 -1
@@ -7436,7 +7436,6 @@ elif test "$ARCH" = "riscv32" || test "$ARCH" = "riscv64" ; then else QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/\$(ARCH) $QEMU_INCLUDES" fi -QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg $QEMU_INCLUDES" echo "TOOLS=$tools" >> $config_host_mak echo "ROMS=$roms" >> $config_host_mak
Signature · 1 line
2.21.0