Skip to content

Commit

Permalink
target/hppa: Switch to use MMU indices 11-15
Browse files Browse the repository at this point in the history
The MMU indices 9-15 will use shorter assembler instructions
when run on a x86-64 host. So, switch over to those to get
smaller code and maybe minimally faster emulation.

Signed-off-by: Helge Deller <deller@gmx.de>
  • Loading branch information
hdeller committed Aug 27, 2023
1 parent 3d066af commit 2ad0450
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions target/hppa/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
basis. It's probably easier to fall back to a strong memory model. */
#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL

#define MMU_KERNEL_IDX 0
#define MMU_PL1_IDX 1
#define MMU_PL2_IDX 2
#define MMU_USER_IDX 3
#define MMU_PHYS_IDX 4

#define PRIV_TO_MMU_IDX(priv) (priv)
#define MMU_IDX_TO_PRIV(mmu_idx) (mmu_idx)
#define MMU_KERNEL_IDX 11
#define MMU_PL1_IDX 12
#define MMU_PL2_IDX 13
#define MMU_USER_IDX 14
#define MMU_PHYS_IDX 15

#define PRIV_TO_MMU_IDX(priv) (MMU_KERNEL_IDX + (priv))
#define MMU_IDX_TO_PRIV(mmu_idx) ((mmu_idx) - MMU_KERNEL_IDX)

#define TARGET_INSN_START_EXTRA_WORDS 1

Expand Down

0 comments on commit 2ad0450

Please sign in to comment.