From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: ale@rev.ng, philmd@linaro.org, marcel.apfelbaum@gmail.com,
wangyanan55@huawei.com, anjo@rev.ng
Subject: [PATCH 69/84] target/mips: Tidy helpers for translation
Date: Wed, 3 May 2023 08:23:16 +0100 [thread overview]
Message-ID: <20230503072331.1747057-70-richard.henderson@linaro.org> (raw)
In-Reply-To: <20230503072331.1747057-1-richard.henderson@linaro.org>
Move most includes from *translate*.c to translate.h, ensuring
that we get the ordering correct. Ensure cpu.h is first.
Use disas/disas.h instead of exec/log.h.
Drop otherwise unused includes.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/mips/tcg/translate.h | 6 ++++--
target/mips/tcg/msa_translate.c | 3 ---
target/mips/tcg/mxu_translate.c | 2 --
target/mips/tcg/octeon_translate.c | 4 +---
target/mips/tcg/rel6_translate.c | 2 --
target/mips/tcg/translate.c | 18 ++++++------------
target/mips/tcg/translate_addr_const.c | 1 -
target/mips/tcg/tx79_translate.c | 4 +---
target/mips/tcg/vr54xx_translate.c | 3 ---
9 files changed, 12 insertions(+), 31 deletions(-)
diff --git a/target/mips/tcg/translate.h b/target/mips/tcg/translate.h
index fa8bf55209..3b0498a47a 100644
--- a/target/mips/tcg/translate.h
+++ b/target/mips/tcg/translate.h
@@ -8,9 +8,11 @@
#ifndef TARGET_MIPS_TRANSLATE_H
#define TARGET_MIPS_TRANSLATE_H
-#include "qemu/log.h"
-#include "exec/translator.h"
+#include "cpu.h"
#include "tcg/tcg-op.h"
+#include "exec/translator.h"
+#include "exec/helper-gen.h"
+#include "qemu/log.h"
#define MIPS_DEBUG_DISAS 0
diff --git a/target/mips/tcg/msa_translate.c b/target/mips/tcg/msa_translate.c
index 220cd3b048..b5b66fb38a 100644
--- a/target/mips/tcg/msa_translate.c
+++ b/target/mips/tcg/msa_translate.c
@@ -11,11 +11,8 @@
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "qemu/osdep.h"
-#include "tcg/tcg-op.h"
-#include "exec/helper-gen.h"
#include "translate.h"
#include "fpu_helper.h"
-#include "internal.h"
static int elm_n(DisasContext *ctx, int x);
static int elm_df(DisasContext *ctx, int x);
diff --git a/target/mips/tcg/mxu_translate.c b/target/mips/tcg/mxu_translate.c
index be038b5f07..39348b3a91 100644
--- a/target/mips/tcg/mxu_translate.c
+++ b/target/mips/tcg/mxu_translate.c
@@ -16,8 +16,6 @@
*/
#include "qemu/osdep.h"
-#include "tcg/tcg-op.h"
-#include "exec/helper-gen.h"
#include "translate.h"
/*
diff --git a/target/mips/tcg/octeon_translate.c b/target/mips/tcg/octeon_translate.c
index 103c304d10..e25c4cbaa0 100644
--- a/target/mips/tcg/octeon_translate.c
+++ b/target/mips/tcg/octeon_translate.c
@@ -7,10 +7,8 @@
*/
#include "qemu/osdep.h"
-#include "tcg/tcg-op.h"
-#include "tcg/tcg-op-gvec.h"
-#include "exec/helper-gen.h"
#include "translate.h"
+#include "tcg/tcg-op-gvec.h"
/* Include the auto-generated decoder. */
#include "decode-octeon.c.inc"
diff --git a/target/mips/tcg/rel6_translate.c b/target/mips/tcg/rel6_translate.c
index d631851258..59f237ba3b 100644
--- a/target/mips/tcg/rel6_translate.c
+++ b/target/mips/tcg/rel6_translate.c
@@ -9,8 +9,6 @@
*/
#include "qemu/osdep.h"
-#include "tcg/tcg-op.h"
-#include "exec/helper-gen.h"
#include "translate.h"
/* Include the auto-generated decoders. */
diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c
index 312ed66989..f3da05ba3b 100644
--- a/target/mips/tcg/translate.c
+++ b/target/mips/tcg/translate.c
@@ -23,19 +23,13 @@
*/
#include "qemu/osdep.h"
-#include "cpu.h"
-#include "internal.h"
-#include "tcg/tcg-op.h"
-#include "exec/translator.h"
-#include "exec/helper-proto.h"
-#include "exec/helper-gen.h"
-#include "semihosting/semihost.h"
-
-#include "trace.h"
-#include "exec/log.h"
-#include "qemu/qemu-print.h"
-#include "fpu_helper.h"
#include "translate.h"
+#include "internal.h"
+#include "exec/helper-proto.h"
+#include "semihosting/semihost.h"
+#include "trace.h"
+#include "disas/disas.h"
+#include "fpu_helper.h"
#define HELPER_H "helper.h"
#include "exec/helper-info.c.inc"
diff --git a/target/mips/tcg/translate_addr_const.c b/target/mips/tcg/translate_addr_const.c
index a510da406c..6f4b39f715 100644
--- a/target/mips/tcg/translate_addr_const.c
+++ b/target/mips/tcg/translate_addr_const.c
@@ -11,7 +11,6 @@
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "qemu/osdep.h"
-#include "tcg/tcg-op.h"
#include "translate.h"
bool gen_lsa(DisasContext *ctx, int rd, int rt, int rs, int sa)
diff --git a/target/mips/tcg/tx79_translate.c b/target/mips/tcg/tx79_translate.c
index 3a45a1bfea..dd6fb8a7bd 100644
--- a/target/mips/tcg/tx79_translate.c
+++ b/target/mips/tcg/tx79_translate.c
@@ -8,10 +8,8 @@
*/
#include "qemu/osdep.h"
-#include "tcg/tcg-op.h"
-#include "tcg/tcg-op-gvec.h"
-#include "exec/helper-gen.h"
#include "translate.h"
+#include "tcg/tcg-op-gvec.h"
/* Include the auto-generated decoder. */
#include "decode-tx79.c.inc"
diff --git a/target/mips/tcg/vr54xx_translate.c b/target/mips/tcg/vr54xx_translate.c
index 804672f84c..2c1f6cc527 100644
--- a/target/mips/tcg/vr54xx_translate.c
+++ b/target/mips/tcg/vr54xx_translate.c
@@ -10,10 +10,7 @@
*/
#include "qemu/osdep.h"
-#include "tcg/tcg-op.h"
-#include "exec/helper-gen.h"
#include "translate.h"
-#include "internal.h"
/* Include the auto-generated decoder. */
#include "decode-vr54xx.c.inc"
--
2.34.1
next prev parent reply other threads:[~2023-05-03 7:30 UTC|newest]
Thread overview: 124+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-03 7:22 [RESEND PATCH 00/84] tcg: Build once for system, once for user Richard Henderson
2023-05-03 7:22 ` [PATCH 01/84] tcg: Split out memory ops to tcg-op-ldst.c Richard Henderson
2023-05-11 15:14 ` Alex Bennée
2023-05-03 7:22 ` [PATCH 02/84] tcg: Widen gen_insn_data to uint64_t Richard Henderson
2023-05-04 12:40 ` Anton Johansson via
2023-05-11 15:22 ` Alex Bennée
2023-05-03 7:22 ` [PATCH 03/84] accel/tcg: Widen tcg-ldst.h addresses " Richard Henderson
2023-05-11 15:26 ` Alex Bennée
2023-05-03 7:22 ` [PATCH 04/84] tcg: Widen helper_{ld,st}_i128 " Richard Henderson
2023-05-11 15:28 ` [PATCH 04/84] tcg: Widen helper_{ld, st}_i128 " Alex Bennée
2023-05-03 7:22 ` [PATCH 05/84] tcg: Widen helper_atomic_* " Richard Henderson
2023-05-11 15:32 ` Alex Bennée
2023-05-03 7:22 ` [PATCH 06/84] tcg: Widen tcg_gen_code pc_start argument " Richard Henderson
2023-05-11 15:33 ` Alex Bennée
2023-05-03 7:22 ` [PATCH 07/84] accel/tcg: Merge gen_mem_wrapped with plugin_gen_empty_mem_callback Richard Henderson
2023-05-11 15:35 ` Alex Bennée
2023-05-03 7:22 ` [PATCH 08/84] accel/tcg: Merge do_gen_mem_cb into caller Richard Henderson
2023-05-11 15:37 ` Alex Bennée
2023-05-03 7:22 ` [PATCH 09/84] tcg: Reduce copies for plugin_gen_mem_callbacks Richard Henderson
2023-05-11 15:44 ` Alex Bennée
2023-05-03 7:22 ` [PATCH 10/84] accel/tcg: Widen plugin_gen_empty_mem_callback to i64 Richard Henderson
2023-05-11 15:47 ` Alex Bennée
2023-05-03 7:22 ` [PATCH 11/84] tcg: Add addr_type to TCGContext Richard Henderson
2023-05-11 15:49 ` Alex Bennée
2023-05-03 7:22 ` [PATCH 12/84] tcg: Remove TCGv from tcg_gen_qemu_{ld,st}_* Richard Henderson
2023-05-11 16:01 ` Alex Bennée
2023-05-03 7:22 ` [PATCH 13/84] tcg: Remove TCGv from tcg_gen_atomic_* Richard Henderson
2023-05-11 16:09 ` Alex Bennée
2023-05-03 7:22 ` [PATCH 14/84] tcg: Split INDEX_op_qemu_{ld, st}* for guest address size Richard Henderson
2023-05-11 16:24 ` Alex Bennée
2023-05-03 7:22 ` [PATCH 15/84] tcg/tci: Elimnate TARGET_LONG_BITS, target_ulong Richard Henderson
2023-05-11 16:33 ` Alex Bennée
2023-05-03 7:22 ` [PATCH 16/84] tcg/i386: Always enable TCG_TARGET_HAS_extr[lh]_i64_i32 Richard Henderson
2023-05-11 16:35 ` Alex Bennée
2023-05-03 7:22 ` [PATCH 17/84] tcg/i386: Conditionalize tcg_out_extu_i32_i64 Richard Henderson
2023-05-11 16:36 ` Alex Bennée
2023-05-03 7:22 ` [PATCH 18/84] tcg/i386: Adjust type of tlb_mask Richard Henderson
2023-05-11 16:39 ` Alex Bennée
2023-05-03 7:22 ` [PATCH 19/84] tcg/i386: Remove TARGET_LONG_BITS, TCG_TYPE_TL Richard Henderson
2023-05-11 16:40 ` Alex Bennée
2023-05-03 7:22 ` [PATCH 20/84] tcg/arm: Remove TARGET_LONG_BITS Richard Henderson
2023-05-11 16:44 ` Alex Bennée
2023-05-03 7:22 ` [PATCH 21/84] tcg/aarch64: Remove USE_GUEST_BASE Richard Henderson
2023-05-11 16:49 ` Alex Bennée
2023-05-03 7:22 ` [PATCH 22/84] tcg/aarch64: Remove TARGET_LONG_BITS, TCG_TYPE_TL Richard Henderson
2023-05-11 16:59 ` Alex Bennée
2023-05-03 7:22 ` [PATCH 23/84] tcg/loongarch64: " Richard Henderson
2023-05-11 17:00 ` Alex Bennée
2023-05-03 7:22 ` [PATCH 24/84] tcg/mips: " Richard Henderson
2023-05-11 17:06 ` Alex Bennée
2023-05-03 7:22 ` [PATCH 25/84] tcg/ppc: " Richard Henderson
2023-05-03 7:22 ` [PATCH 26/84] tcg/riscv: " Richard Henderson
2023-05-03 7:22 ` [PATCH 27/84] tcg/s390x: " Richard Henderson
2023-05-03 7:22 ` [PATCH 28/84] tcg/sparc64: " Richard Henderson
2023-05-03 7:22 ` [PATCH 29/84] tcg: " Richard Henderson
2023-05-12 9:37 ` Alex Bennée
2023-05-03 7:22 ` [PATCH 30/84] tcg: Move TCG_TYPE_TL from tcg.h to tcg-op.h Richard Henderson
2023-05-03 7:22 ` [PATCH 31/84] tcg: Add page_bits and page_mask to TCGContext Richard Henderson
2023-05-15 12:39 ` Anton Johansson via
2023-05-03 7:22 ` [PATCH 32/84] tcg: Add tlb_dyn_max_bits " Richard Henderson
2023-05-15 16:41 ` Anton Johansson via
2023-05-03 7:22 ` [PATCH 33/84] tcg: Widen CPUTLBEntry comparators to 64-bits Richard Henderson
2023-05-03 7:22 ` [PATCH 34/84] tcg: Add tlb_fast_offset to TCGContext Richard Henderson
2023-05-03 7:22 ` [PATCH 35/84] tcg: Remove TCG_TARGET_TLB_DISPLACEMENT_BITS Richard Henderson
2023-05-03 7:22 ` [PATCH 36/84] tcg: Split out tcg/debug-assert.h Richard Henderson
2023-05-03 7:22 ` [PATCH 37/84] *: Add missing includes of qemu/error-report.h Richard Henderson
2023-05-03 7:22 ` [PATCH 38/84] *: Add missing includes of tcg/debug-assert.h Richard Henderson
2023-05-03 7:22 ` [PATCH 39/84] *: Add missing includes of tcg/tcg.h Richard Henderson
2023-05-03 7:22 ` [PATCH 40/84] tcg: Split out tcg-target-reg-bits.h Richard Henderson
2023-05-03 7:22 ` [PATCH 41/84] target/arm: Fix test of TCG_OVERSIZED_GUEST Richard Henderson
2023-05-03 7:22 ` [PATCH 42/84] tcg: Split out tcg/oversized-guest.h Richard Henderson
2023-05-03 7:22 ` [PATCH 43/84] tcg: Move TCGv, dup_const_tl definitions to tcg-op.h Richard Henderson
2023-05-03 7:22 ` [PATCH 44/84] tcg: Split tcg/tcg-op-common.h from tcg/tcg-op.h Richard Henderson
2023-05-03 7:22 ` [PATCH 45/84] target/arm: Include helper-gen.h in translator.h Richard Henderson
2023-05-03 7:22 ` [PATCH 46/84] target/hexagon: Include helper-gen.h where needed Richard Henderson
2023-05-03 7:22 ` [PATCH 47/84] tcg: Remove outdated comments in helper-head.h Richard Henderson
2023-05-03 7:22 ` [PATCH 48/84] tcg: Move TCGHelperInfo and dependencies to tcg/helper-info.h Richard Henderson
2023-05-03 7:22 ` [PATCH 49/84] tcg: Pass TCGHelperInfo to tcg_gen_callN Richard Henderson
2023-05-03 7:22 ` [PATCH 50/84] tcg: Move temp_idx and tcgv_i32_temp debug out of line Richard Henderson
2023-05-03 7:22 ` [PATCH 51/84] tcg: Split tcg_gen_callN Richard Henderson
2023-05-03 7:22 ` [PATCH 52/84] tcg: Split helper-gen.h Richard Henderson
2023-05-03 7:23 ` [PATCH 53/84] tcg: Split helper-proto.h Richard Henderson
2023-05-03 7:23 ` [PATCH 54/84] tcg: Add insn_start_words to TCGContext Richard Henderson
2023-05-03 7:23 ` [PATCH 55/84] tcg: Add guest_mo " Richard Henderson
2023-05-03 7:23 ` [PATCH 56/84] tcg: Move TLB_FLAGS_MASK check out of get_alignment_bits Richard Henderson
2023-05-03 7:23 ` [PATCH 57/84] tcg: Split tcg/tcg-op-gvec.h Richard Henderson
2023-05-03 7:23 ` [PATCH 58/84] tcg: Remove NO_CPU_IO_DEFS Richard Henderson
2023-05-03 7:23 ` [PATCH 59/84] exec-all: Widen tb_page_addr_t for user-only Richard Henderson
2023-05-03 7:23 ` [PATCH 60/84] exec-all: Widen TranslationBlock pc and cs_base to 64-bits Richard Henderson
2023-05-03 7:23 ` [PATCH 61/84] tcg: Remove DEBUG_DISAS Richard Henderson
2023-05-03 7:23 ` [PATCH 62/84] tcg: Remove USE_TCG_OPTIMIZATIONS Richard Henderson
2023-05-03 7:23 ` [PATCH 63/84] tcg: Spit out exec/translation-block.h Richard Henderson
2023-05-03 7:23 ` [PATCH 64/84] include/exec: Remove CODE_GEN_AVG_BLOCK_SIZE Richard Henderson
2023-05-03 7:23 ` [PATCH 65/84] accel/tcg: Move most of gen-icount.h into translator.c Richard Henderson
2023-05-03 7:23 ` [PATCH 66/84] accel/tcg: Introduce translator_io_start Richard Henderson
2023-05-03 7:23 ` [PATCH 67/84] accel/tcg: Move translator_fake_ldb out of line Richard Henderson
2023-05-03 7:23 ` [PATCH 68/84] target/arm: Tidy helpers for translation Richard Henderson
2023-05-03 7:23 ` Richard Henderson [this message]
2023-05-03 7:23 ` [PATCH 70/84] *: Add missing includes of exec/translation-block.h Richard Henderson
2023-05-03 7:23 ` [PATCH 71/84] *: Add missing includes of exec/exec-all.h Richard Henderson
2023-05-03 7:23 ` [PATCH 72/84] accel/tcg: Tidy includes for translator.[ch] Richard Henderson
2023-05-03 7:23 ` [PATCH 73/84] tcg: Define IN_TCG Richard Henderson
2023-05-03 7:23 ` [PATCH 74/84] tcg: Fix PAGE/PROT confusion Richard Henderson
2023-05-03 7:23 ` [PATCH 75/84] tcg: Move env defines out of NEED_CPU_H in helper-head.h Richard Henderson
2023-05-03 7:23 ` [PATCH 76/84] tcg: Remove target-specific headers from tcg.[ch] Richard Henderson
2023-05-03 7:23 ` [PATCH 77/84] plugins: Move plugin_insn_append to translator.c Richard Henderson
2023-05-03 7:23 ` [PATCH 78/84] plugins: Drop unused headers from exec/plugin-gen.h Richard Henderson
2023-05-03 7:23 ` [PATCH 79/84] disas: Move disas.c to disas/ Richard Henderson
2023-05-08 14:16 ` Thomas Huth
2023-05-03 7:23 ` [PATCH 80/84] disas: Remove target_ulong from the interface Richard Henderson
2023-05-08 14:19 ` Thomas Huth
2023-05-09 15:15 ` Richard Henderson
2023-05-03 7:23 ` [PATCH 81/84] tcg: Split out exec/user/guest-base.h Richard Henderson
2023-05-08 14:21 ` Thomas Huth
2023-05-03 7:23 ` [PATCH 82/84] disas: Remove target-specific headers Richard Henderson
2023-05-08 14:22 ` Thomas Huth
2023-05-03 7:23 ` [PATCH 83/84] exec/poison: Do not poison CONFIG_SOFTMMU Richard Henderson
2023-05-08 14:27 ` Thomas Huth
2023-05-08 15:14 ` Paolo Bonzini
2023-05-08 15:19 ` Thomas Huth
2023-05-11 13:38 ` Richard Henderson
2023-05-08 15:20 ` Thomas Huth
2023-05-03 7:23 ` [PATCH 84/84] tcg: Build once for system and once for user-only Richard Henderson
2023-05-11 16:42 ` [RESEND PATCH 00/84] tcg: Build once for system, once for user Alex Bennée
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=20230503072331.1747057-70-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=ale@rev.ng \
--cc=anjo@rev.ng \
--cc=marcel.apfelbaum@gmail.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=wangyanan55@huawei.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).