Skip to content

target/arm: Split translate-*.c.inc into separate compilation units

Peter Maydell qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest13 patches 4 repliesIn review
  2. v113 patches 22 repliesSuperseded

Changes in v2 from the cover letter

* rebased on current master (with rth's alignment series in)
* patch 5 has changed because the gen_aa32 functions were all changed by the alignment patchset
* patch 7: made gen_set_cpsr and gen_set_condexec not inline, per rth's suggestion

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13target/arm: Move constant expanders to translate.htarget/arm/translate.c target/arm/translate.h+24 -240 replies
2/13target/arm: Share unallocated_encoding() and gen_exception_insn()target/arm/translate-a64.c target/arm/translate-a64.h target/arm/translate.c +1 more+12 -220 replies
3/13target/arm: Make functions used by m-nocp globaltarget/arm/translate-a32.h target/arm/translate-vfp.c.inc target/arm/translate.c+65 -330 replies
4/13target/arm: Split m-nocp trans functions into their own filetarget/arm/meson.build target/arm/translate-a32.h target/arm/translate-m-nocp.c +2 more+226 -1980 replies
5/13target/arm: Move gen_aa32 functions to translate-a32.htarget/arm/translate-a32.h target/arm/translate.c+69 -352 replies
6/13target/arm: Move vfp_{load, store}_reg{32, 64} to translate-vfp.c.inctarget/arm/translate-vfp.c.inc target/arm/translate.c+20 -200 replies
7/13target/arm: Make functions used by translate-vfp globaltarget/arm/translate-a32.h target/arm/translate.c+26 -170 replies
8/13target/arm: Make translate-vfp.c.inc its own compilation unittarget/arm/meson.build target/arm/translate-a32.h target/arm/translate-vfp.c +1 more+13 -90 replies
9/13target/arm: Move vfp_reg_ptr() to translate-neon.c.inctarget/arm/translate-neon.c.inc target/arm/translate.c+7 -70 replies
10/13target/arm: Delete unused typedeftarget/arm/translate.c+0 -21 reply
11/13target/arm: Move NeonGenThreeOpEnvFn typedef to translate.htarget/arm/translate.c target/arm/translate.h+2 -31 reply
12/13target/arm: Make functions used by translate-neon globaltarget/arm/translate-a32.h target/arm/translate.c+10 -80 replies
13/13target/arm: Make translate-neon.c.inc its own compilation unittarget/arm/meson.build target/arm/translate-a32.h target/arm/translate-neon.c +1 more+14 -110 replies

Reviews trailers per patch

All 13 patches have a Reviewed-by or Acked-by.

PatchRichard HendersonPhilippe Mathieu-Daudé
1/13R-b R-b
2/13R-b
3/13R-b
4/13R-b
5/13R-b R-b
6/13R-b R-b
7/13R-b R-b
8/13R-b R-b
9/13R-b R-b
10/13R-b R-b
11/13R-b R-b
12/13R-b R-b
13/13R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/13] target/arm: Split translate-*.c.inc into separate compilation units

When we first converted the A32/T32 frontends to use decodetree, we put the trans* functions for VFP and Neon into their own separate files, but used the preprocessor to just #include those files into translate.c. This was a pragmatic arrangement to avoid having to also rearrange translate.c which had a lot of utility functions shared between the main integer decode and the VFP/Neon.

However, having translate.c effectively one enormous file with all of the integer, Neon and VFP decode in it means it can push the limits of what some compilers can handle (especially on 32-bit hosts if the compiler has bugs where it uses too much memory either during optimisation or while generating debug info).

This series breaks out all the translate-*.c.inc into separate compilation units.

Changes v1->v2:
* rebased on current master (with rth's alignment series in)
* patch 5 has changed because the gen_aa32 functions were all changed by the alignment patchset
* patch 7: made gen_set_cpsr and gen_set_condexec not inline, per rth's suggestion

Only patch 5 needs review.

thanks
-- PMM

Peter Maydell (13):
target/arm: Move constant expanders to translate.h target/arm: Share unallocated_encoding() and gen_exception_insn() target/arm: Make functions used by m-nocp global target/arm: Split m-nocp trans functions into their own file target/arm: Move gen_aa32 functions to translate-a32.h target/arm: Move vfp_{load,store}_reg{32,64} to translate-vfp.c.inc target/arm: Make functions used by translate-vfp global target/arm: Make translate-vfp.c.inc its own compilation unit target/arm: Move vfp_reg_ptr() to translate-neon.c.inc target/arm: Delete unused typedef
target/arm: Move NeonGenThreeOpEnvFn typedef to translate.h target/arm: Make functions used by translate-neon global target/arm: Make translate-neon.c.inc its own compilation unit

 target/arm/translate-a32.h                    | 144 +++++++++++
 target/arm/translate-a64.h                    |   2 -
 target/arm/translate.h                        |  29 +++
 target/arm/translate-a64.c                    |  15 --
 target/arm/translate-m-nocp.c                 | 221 +++++++++++++++++
 ...{translate-neon.c.inc => translate-neon.c} |  19 +-
 .../{translate-vfp.c.inc => translate-vfp.c}  | 230 +++---------------
 target/arm/translate.c                        | 200 ++++-----------
 target/arm/meson.build                        |  15 +-
 9 files changed, 487 insertions(+), 388 deletions(-)
 create mode 100644 target/arm/translate-a32.h
 create mode 100644 target/arm/translate-m-nocp.c
 rename target/arm/{translate-neon.c.inc => translate-neon.c} (99%)
 rename target/arm/{translate-vfp.c.inc => translate-vfp.c} (94%)
Signature · 1 line
2.20.1