Skip to content

target-ppc: create TCG slots for registers based on CPU

Nathan Froyd qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4move PPC insn flags to cpu.htarget-ppc/cpu.h target-ppc/translate.c+138 -1383 replies
2/4move ppc_def_t definition to cpu.htarget-ppc/cpu.h target-ppc/translate_init.c+15 -150 replies
3/4pass the cpu definition to ppc_translate_inittarget-ppc/cpu.h target-ppc/helper.c target-ppc/translate.c+3 -30 replies
4/4create TCG slots for registers based on CPUtarget-ppc/translate.c+30 -220 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/4] target-ppc: create TCG slots for registers based on CPU

For PPC guests, I noticed that we create TCG slots for all the potential kinds of registers (float, Altivec, SPE), even if the chip doesn't have instructions to access those registers.

This patch series tweaks the initialization routine to create the TCG values for registers necessary for particular classes of instructions only if the emulated chip supports those instructions. The first couple of patches are simply busywork of moving things around; the last patch is where all the action is at.

I am not a TCG expert, but there are several loops in TCG over all globals and it seems like those loops would go faster if they didn't have to consider registers that would never be touched. If this patch series makes no difference in TCG's performance, then I'd be glad to have an explanation of why that's the case.

-Nathan