Skip to content

target/mips: Remove target-specific endianness knowledge

Philippe Mathieu-Daudé qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest16 patches 17 repliesIn review
  2. v112 patches 8 repliesSuperseded

Changes in v2 from the cover letter

- Addressed rth review comment (adding new patches)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16target/mips: Declare mips_env_is_bigendian() in 'internal.h'target/mips/internal.h target/mips/tcg/ldst_helper.c+10 -101 reply
2/16target/mips: Rename cpu_is_bigendian() -> disas_is_bigendian()target/mips/tcg/nanomips_translate.c.inc target/mips/tcg/translate.c target/mips/tcg/translate.h+6 -61 reply
3/16target/mips: Introduce mo_endian_env() helpertarget/mips/internal.h+5 -01 reply
4/16target/mips: Replace MO_TE by mo_endian_env() in get_pte()target/mips/tcg/sysemu/tlb_helper.c+1 -11 reply
5/16target/mips: Convert mips16e decr_and_load/store() macros to functionstarget/mips/tcg/mips16e_translate.c.inc+53 -480 replies
6/16target/mips: Factor mo_endian_rev() out of MXU codetarget/mips/tcg/mxu_translate.c target/mips/tcg/translate.h+9 -41 reply
7/16target/mips: Explode MO_TExx -> MO_TE | MO_xxtarget/mips/tcg/micromips_translate.c.inc target/mips/tcg/mips16e_translate.c.inc target/mips/tcg/nanomips_translate.c.inc +2 more+96 -961 reply
8/16target/mips: Rename unused sysemu argument of OP_LD_ATOMIC()target/mips/tcg/translate.c+1 -11 reply
9/16target/mips: Introduce mo_endian() helpertarget/mips/tcg/translate.h+5 -01 reply
10/16target/mips: Replace MO_TE by mo_endian()target/mips/tcg/micromips_translate.c.inc target/mips/tcg/mips16e_translate.c.inc target/mips/tcg/msa_helper.c +4 more+103 -1034 replies
11/16target/mips: Have gen_addiupc() expand $pc during translationtarget/mips/tcg/translate.c+4 -61 reply
12/16target/mips: Use gen_op_addr_addi() when possibletarget/mips/tcg/micromips_translate.c.inc target/mips/tcg/mips16e_translate.c.inc target/mips/tcg/nanomips_translate.c.inc +2 more+12 -261 reply
13/16target/mips: Use tcg_constant_tl() instead of tcg_gen_movi_tl()target/mips/tcg/nanomips_translate.c.inc target/mips/tcg/translate.c+58 -1010 replies
14/16target/mips: Expose MIPSCPU::is_big_endian propertytarget/mips/cpu.c target/mips/cpu.h+11 -41 reply
15/16hw/mips/cps: Set the vCPU 'cpu-big-endian' propertyhw/mips/cps.c hw/mips/malta.c include/hw/mips/cps.h+7 -01 reply
16/16hw/mips: Have mips_cpu_create_with_clock() take an endianness argumenthw/mips/fuloong2e.c hw/mips/jazz.c hw/mips/loongson3_virt.c +4 more+13 -71 reply

Reviews trailers per patch

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

PatchJiaxun YangRichard Henderson
1/16R-b T-b R-b
2/16R-b
3/16R-b T-b R-b
4/16R-b T-b R-b
5/16R-b T-b R-b
6/16R-b
7/16R-b T-b R-b
8/16R-b
9/16R-b T-b R-b
10/16R-b T-b
11/16R-b
12/16R-b
13/16R-b
14/16R-b T-b R-b
15/16R-b T-b R-b
16/16R-b T-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/16] target/mips: Remove target-specific endianness knowledge

Since v1:
- Addressed rth review comment (adding new patches)

Get vCPU endianness from CP0::BE bit.
Propagate endianness at the board level, using QOM property. Remove target-specific endianness knowledge from target/.

Philippe Mathieu-Daudé (16):
target/mips: Declare mips_env_is_bigendian() in 'internal.h' target/mips: Rename cpu_is_bigendian() -> disas_is_bigendian() target/mips: Introduce mo_endian_env() helper
target/mips: Replace MO_TE by mo_endian_env() in get_pte() target/mips: Convert mips16e decr_and_load/store() macros to functions target/mips: Factor mo_endian_rev() out of MXU code target/mips: Explode MO_TExx -> MO_TE | MO_xx
target/mips: Rename unused sysemu argument of OP_LD_ATOMIC() target/mips: Introduce mo_endian() helper
target/mips: Replace MO_TE by mo_endian()
target/mips: Have gen_addiupc() expand $pc during translation target/mips: Use gen_op_addr_addi() when possible target/mips: Use tcg_constant_tl() instead of tcg_gen_movi_tl() target/mips: Expose MIPSCPU::is_big_endian property hw/mips/cps: Set the vCPU 'cpu-big-endian' property hw/mips: Have mips_cpu_create_with_clock() take an endianness argument

 include/hw/mips/cps.h                     |   1 +
 target/mips/cpu.h                         |   7 +-
 target/mips/internal.h                    |  10 ++
 target/mips/tcg/translate.h               |  13 +-
 hw/mips/cps.c                             |   4 +
 hw/mips/fuloong2e.c                       |   2 +-
 hw/mips/jazz.c                            |   2 +-
 hw/mips/loongson3_virt.c                  |   2 +-
 hw/mips/malta.c                           |   5 +-
 hw/mips/mipssim.c                         |   2 +-
 target/mips/cpu.c                         |  17 +-
 target/mips/tcg/ldst_helper.c             |  15 +-
 target/mips/tcg/msa_helper.c              |   2 +-
 target/mips/tcg/mxu_translate.c           |  18 +-
 target/mips/tcg/sysemu/tlb_helper.c       |   2 +-
 target/mips/tcg/translate.c               | 193 ++++++++++------------
 target/mips/tcg/tx79_translate.c          |   8 +-
 target/mips/tcg/micromips_translate.c.inc |  34 ++--
 target/mips/tcg/mips16e_translate.c.inc   | 118 +++++++------
 target/mips/tcg/nanomips_translate.c.inc  | 150 +++++++----------
 20 files changed, 293 insertions(+), 312 deletions(-)
Signature · 1 line
2.45.2