]> xenbits.xensource.com Git - qemu-xen.git/commit
tcg/ppc: Enable direct branching tcg_out_goto_tb with TCG_REG_TB
authorJordan Niethe <jniethe5@gmail.com>
Tue, 15 Aug 2023 16:47:11 +0000 (16:47 +0000)
committerRichard Henderson <richard.henderson@linaro.org>
Sun, 22 Oct 2023 23:32:27 +0000 (16:32 -0700)
commit03434d52024934620a001a875b540b06abd0b169
tree8185d5ae2c1180670b3211952bc3e4d43cf6b39e
parent096d118592caa03188db6a190988221b65a2bd81
tcg/ppc: Enable direct branching tcg_out_goto_tb with TCG_REG_TB

Direct branch patching was disabled when using TCG_REG_TB in commit
736a1588c1 ("tcg/ppc: Fix race in goto_tb implementation").

The issue with direct branch patching with TCG_REG_TB is the lack of
synchronization between the new TCG_REG_TB being established and the
direct branch being patched in.

If each translation block is responsible for establishing its own
TCG_REG_TB then there can be no synchronization issue.

Make each translation block begin by setting up its own TCG_REG_TB.
Use the preferred 'bcl 20,31,$+4' sequence.

Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
[rth: Split out tcg_out_tb_start, power9 addpcis]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
tcg/ppc/tcg-target.c.inc