Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
target/arm: Tidy helpers for translation
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.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
rth7680 committed Jun 5, 2023
1 parent 309e014 commit 5d05e5a
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 46 deletions.
13 changes: 3 additions & 10 deletions target/arm/tcg/translate-a64.c
Expand Up @@ -18,20 +18,13 @@
*/
#include "qemu/osdep.h"

#include "cpu.h"
#include "exec/exec-all.h"
#include "tcg/tcg-op.h"
#include "tcg/tcg-op-gvec.h"
#include "translate.h"
#include "translate-a64.h"
#include "qemu/log.h"
#include "disas/disas.h"
#include "arm_ldst.h"
#include "translate.h"
#include "internals.h"
#include "qemu/host-utils.h"
#include "semihosting/semihost.h"
#include "exec/log.h"
#include "cpregs.h"
#include "translate-a64.h"
#include "qemu/atomic128.h"

static TCGv_i64 cpu_X[32];
static TCGv_i64 cpu_pc;
Expand Down
2 changes: 0 additions & 2 deletions target/arm/tcg/translate-m-nocp.c
Expand Up @@ -18,8 +18,6 @@
*/

#include "qemu/osdep.h"
#include "tcg/tcg-op.h"
#include "tcg/tcg-op-gvec.h"
#include "translate.h"
#include "translate-a32.h"

Expand Down
3 changes: 0 additions & 3 deletions target/arm/tcg/translate-mve.c
Expand Up @@ -18,9 +18,6 @@
*/

#include "qemu/osdep.h"
#include "tcg/tcg-op.h"
#include "tcg/tcg-op-gvec.h"
#include "exec/exec-all.h"
#include "translate.h"
#include "translate-a32.h"

Expand Down
3 changes: 0 additions & 3 deletions target/arm/tcg/translate-neon.c
Expand Up @@ -21,9 +21,6 @@
*/

#include "qemu/osdep.h"
#include "tcg/tcg-op.h"
#include "tcg/tcg-op-gvec.h"
#include "exec/exec-all.h"
#include "translate.h"
#include "translate-a32.h"

Expand Down
6 changes: 0 additions & 6 deletions target/arm/tcg/translate-sme.c
Expand Up @@ -18,14 +18,8 @@
*/

#include "qemu/osdep.h"
#include "cpu.h"
#include "tcg/tcg-op.h"
#include "tcg/tcg-op-gvec.h"
#include "tcg/tcg-gvec-desc.h"
#include "translate.h"
#include "translate-a64.h"
#include "fpu/softfloat.h"


/*
* Include the generated decoder.
Expand Down
9 changes: 0 additions & 9 deletions target/arm/tcg/translate-sve.c
Expand Up @@ -18,16 +18,7 @@
*/

#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/exec-all.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"
#include "internals.h"
#include "exec/log.h"
#include "translate-a64.h"
#include "fpu/softfloat.h"

Expand Down
3 changes: 0 additions & 3 deletions target/arm/tcg/translate-vfp.c
Expand Up @@ -21,9 +21,6 @@
*/

#include "qemu/osdep.h"
#include "tcg/tcg-op.h"
#include "tcg/tcg-op-gvec.h"
#include "exec/exec-all.h"
#include "translate.h"
#include "translate-a32.h"

Expand Down
13 changes: 3 additions & 10 deletions target/arm/tcg/translate.c
Expand Up @@ -20,20 +20,13 @@
*/
#include "qemu/osdep.h"

#include "cpu.h"
#include "internals.h"
#include "disas/disas.h"
#include "exec/exec-all.h"
#include "tcg/tcg-op.h"
#include "tcg/tcg-op-gvec.h"
#include "translate.h"
#include "translate-a32.h"
#include "qemu/log.h"
#include "qemu/bitops.h"
#include "disas/disas.h"
#include "arm_ldst.h"
#include "semihosting/semihost.h"
#include "exec/log.h"
#include "cpregs.h"
#include "translate.h"
#include "translate-a32.h"
#include "exec/helper-proto.h"

#define HELPER_H "helper.h"
Expand Down
3 changes: 3 additions & 0 deletions target/arm/tcg/translate.h
@@ -1,6 +1,9 @@
#ifndef TARGET_ARM_TRANSLATE_H
#define TARGET_ARM_TRANSLATE_H

#include "cpu.h"
#include "tcg/tcg-op.h"
#include "tcg/tcg-op-gvec.h"
#include "exec/translator.h"
#include "exec/helper-gen.h"
#include "internals.h"
Expand Down

0 comments on commit 5d05e5a

Please sign in to comment.