mbox series

[for-8.2,0/7] tcg/ppc: Support power10 prefixed instructions

Message ID 20230804213355.294443-1-richard.henderson@linaro.org
Headers show
Series tcg/ppc: Support power10 prefixed instructions | expand

Message

Richard Henderson Aug. 4, 2023, 9:33 p.m. UTC
Emit one 64-bit instruction for large constants and pc-relatives.
With pc-relative addressing, we don't need REG_TB, which means we
can re-enable direct branching for goto_tb.


r~


Richard Henderson (7):
  tcg/ppc: Untabify tcg-target.c.inc
  tcg/ppc: Use PADDI in tcg_out_movi
  tcg/ppc: Use prefixed instructions in tcg_out_mem_long
  tcg/ppc: Use PLD in tcg_out_movi for constant pool
  tcg/ppc: Use prefixed instructions in tcg_out_dupi_vec
  tcg/ppc: Disable USE_REG_TB for Power v3.1
  tcg/ppc: Use prefixed instructions for tcg_out_goto_tb

 tcg/ppc/tcg-target.c.inc | 233 +++++++++++++++++++++++++++++++++++----
 1 file changed, 211 insertions(+), 22 deletions(-)

Comments

Nicholas Piggin Aug. 6, 2023, 11:55 a.m. UTC | #1
On Sat Aug 5, 2023 at 7:33 AM AEST, Richard Henderson wrote:
> Emit one 64-bit instruction for large constants and pc-relatives.
> With pc-relative addressing, we don't need REG_TB, which means we
> can re-enable direct branching for goto_tb.

Very cool. I tested this on a POWER10 and it has been stable so
far. Using mttcg with SMP 8 machine, with this patch, a parallel
gcc compile job in a Linux distro is 11.5% faster. Is such a big
improvment expected?

For the series,

Tested-by: Nicholas Piggin <npiggin@gmail.com>

Thanks,
Nick
Richard Henderson Aug. 6, 2023, 2:22 p.m. UTC | #2
On 8/6/23 04:55, Nicholas Piggin wrote:
> On Sat Aug 5, 2023 at 7:33 AM AEST, Richard Henderson wrote:
>> Emit one 64-bit instruction for large constants and pc-relatives.
>> With pc-relative addressing, we don't need REG_TB, which means we
>> can re-enable direct branching for goto_tb.
> 
> Very cool. I tested this on a POWER10 and it has been stable so
> far. Using mttcg with SMP 8 machine, with this patch, a parallel
> gcc compile job in a Linux distro is 11.5% faster. Is such a big
> improvment expected?

Possibly, given that we had to disable direct branch patching for USE_REG_TB.


r~