Skip to content

Introduce MMU_INDEX()

Helge Deller qemu-devel 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest23 patches 3 repliesIn review
  2. v119 of 23 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/23cpu-defs.h; Add MMU_INDEX() helperinclude/exec/cpu-defs.h+5 -00 replies
2/23target/i386: Use MMU_INDEX() helpertarget/i386/cpu.h+5 -50 replies
3/23target/hppa: Use MMU_INDEX() helpertarget/hppa/cpu.h+3 -30 replies
4/23target/alpha: Use MMU_INDEX() helpertarget/alpha/cpu.h+3 -30 replies
5/23target/avr: Use MMU_INDEX() helpertarget/avr/cpu.h+2 -20 replies
6/23target/hexagon: Use MMU_INDEX() helpertarget/hexagon/cpu.h+1 -10 replies
7/23target/loongarch: Use MMU_INDEX() helpertarget/loongarch/cpu.h+4 -40 replies
8/23target/mips: Use MMU_INDEX() helpertarget/mips/cpu.h+3 -30 replies
9/23target/openrisc: Use MMU_INDEX() helpertarget/openrisc/cpu.h+3 -30 replies
10/23target/riscv: Use MMU_INDEX() helpertarget/riscv/cpu.h target/riscv/cpu_helper.c+3 -32 replies
11/23target/s390x: Use MMU_INDEX() helpertarget/s390x/cpu.h+5 -50 replies
12/23target/sparc: Use MMU_INDEX() helpertarget/sparc/cpu.h+10 -100 replies
13/23target/xtensa: Use MMU_INDEX() helpertarget/xtensa/cpu.h+2 -20 replies
14/23target/arm: Use MMU_INDEX() helpertarget/arm/cpu.h+2 -21 reply
15/23target/cris: Use MMU_INDEX() helpertarget/cris/cpu.h+2 -20 replies
16/23target/m68k: Use MMU_INDEX() helpertarget/m68k/cpu.h+3 -30 replies
17/23target/microblaze: Use MMU_INDEX() helpertarget/microblaze/cpu.h+3 -30 replies
18/23target/m68k: Use MMU_INDEX() helpertarget/nios2/cpu.h+2 -20 replies
19/23target/ppc: Use MMU_INDEX() helpertarget/ppc/cpu.h+3 -20 replies
20/23target/rx: Use MMU_INDEX() helpertarget/rx/cpu.h+1 -10 replies
21/23target/sh4: Use MMU_INDEX() helpertarget/sh4/cpu.h+4 -30 replies
22/23target/tricore: Use MMU_INDEX() helpertarget/tricore/cpu.h+2 -20 replies
23/23cpu-defs.h: Reduce generated code size by inverting MMU_INDEX()include/exec/cpu-defs.h+6 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 00/23] Introduce MMU_INDEX()

This is v2 of the patchset.
It is *identical* to v1, but v1 missed patches #20-24 since I hit a mail batch limit with my email provider.

This patchset introduces the new helper macro MMU_INDEX(). whill will (after applying the last patch) allow to generate
smaller code by the tcg.

Patch #1 adds the MMU_INDEX() helper macro, which simply wraps the given value.

Patches #2-#23 are trivial patches which convert each target to use the MMU_INDEX() macro.

Patch #24 switches MMU_INDEX() to return a new MMU idx which is counts down from (NB_MMU_MODES-1). That change reduces the needed negative offset to access the TLB entry which in turn let the tcg compiler generates smaller instructions.

Please review.

Helge

Helge Deller (23):
cpu-defs.h; Add MMU_INDEX() helper
target/i386: Use MMU_INDEX() helper
target/hppa: Use MMU_INDEX() helper
target/alpha: Use MMU_INDEX() helper
target/avr: Use MMU_INDEX() helper
target/hexagon: Use MMU_INDEX() helper target/loongarch: Use MMU_INDEX() helper
target/mips: Use MMU_INDEX() helper
target/openrisc: Use MMU_INDEX() helper
target/riscv: Use MMU_INDEX() helper
target/s390x: Use MMU_INDEX() helper
target/sparc: Use MMU_INDEX() helper
target/xtensa: Use MMU_INDEX() helper
target/arm: Use MMU_INDEX() helper
target/cris: Use MMU_INDEX() helper
target/m68k: Use MMU_INDEX() helper target/microblaze: Use MMU_INDEX() helper target/m68k: Use MMU_INDEX() helper
target/ppc: Use MMU_INDEX() helper
target/rx: Use MMU_INDEX() helper
target/sh4: Use MMU_INDEX() helper
target/tricore: Use MMU_INDEX() helper
cpu-defs.h: Reduce generated code size by inverting MMU_INDEX()

 include/exec/cpu-defs.h   | 10 ++++++++++
 target/alpha/cpu.h        |  6 +++---
 target/arm/cpu.h          |  4 ++--
 target/avr/cpu.h          |  4 ++--
 target/cris/cpu.h         |  4 ++--
 target/hexagon/cpu.h      |  2 +-
 target/hppa/cpu.h         |  6 +++---
 target/i386/cpu.h         | 10 +++++-----
 target/loongarch/cpu.h    |  8 ++++----
 target/m68k/cpu.h         |  6 +++---
 target/microblaze/cpu.h   |  6 +++---
 target/mips/cpu.h         |  6 +++---
 target/nios2/cpu.h        |  4 ++--
 target/openrisc/cpu.h     |  6 +++---
 target/ppc/cpu.h          |  5 +++--
 target/riscv/cpu.h        |  4 ++--
 target/riscv/cpu_helper.c |  2 +-
 target/rx/cpu.h           |  2 +-
 target/s390x/cpu.h        | 10 +++++-----
 target/sh4/cpu.h          |  7 ++++---
 target/sparc/cpu.h        | 20 ++++++++++----------
 target/tricore/cpu.h      |  4 ++--
 target/xtensa/cpu.h       |  4 ++--
 23 files changed, 76 insertions(+), 64 deletions(-)

--
2.41.0