lightning
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 0/8] mips: Fill delay slots


From: Paul Cercueil
Subject: [PATCH 0/8] mips: Fill delay slots
Date: Sat, 7 Jan 2023 20:35:42 +0000

Hi Paulo,

With this patchset, Lightning will now attempt to fill the delay slots
of the most common branch and jump opcodes on MIPS.

The code will only attempt to move the opcode generated right before the
branch or jump, so this could still be optimized a bit, but in practice
it works most of the times.

The code will also check that the opcode before the branch or jump is
not targetted by a branch itself, that it is not already the delay slot
of another branch, and that it does not write any register used in
comparative branches.

With my particular setup, this results in the generated code being about
10% smaller overall.

Cheers,
-Paul

Paul Cercueil (8):
  mips: Optimize jit_eqr / jit_eqi
  mips: Fill delay slots of JR opcodes in jit_jmpr
  mips: Fill delay slots of JALR opcodes in jit_callr
  mips: Fill delay slots of J in jit_jmpi
  mips: Fill delay slots in jit_beqr / jit_beqi
  mips: Fill delay slots in jit_bner / jit_bnei
  mips: Fill delay slots in jit_bgtr, jit_bgti, jit_bler, jit_blei
  mips: Fill delay slots in jit_bger, jit_bgei, jit_bltr, jit_blti

 lib/jit_mips-cpu.c | 710 ++++++++++++++++++++++++---------------------
 lib/jit_mips.c     |  84 ++++--
 2 files changed, 442 insertions(+), 352 deletions(-)

-- 
2.39.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]