[MIPS] Optimize JIT code generated by methods with TrustedImm32 operand
https://bugs.webkit.org/show_bug.cgi?id=183740
Patch by Stanislav Ocovaj <stanislav.ocovaj@rt-rk.com> on 2018-04-02
Reviewed by Yusuke Suzuki.
In many macro assembler methods with TrustedImm32 operand a move imm, immTemp (pseudo)instruction is
first generated and a register operand variant of the same method is called to generate the rest
of the code. If the immediate value can fit in 16 bits then we can skip the move instruction and
generate more efficient code using MIPS instructions with immediate operand.
* assembler/MIPSAssembler.h:
(JSC::MIPSAssembler::slti):
* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::lshift32):
(JSC::MacroAssemblerMIPS::xor32):
(JSC::MacroAssemblerMIPS::branch8):
(JSC::MacroAssemblerMIPS::compare8):
(JSC::MacroAssemblerMIPS::branch32):
(JSC::MacroAssemblerMIPS::branch32WithUnalignedHalfWords):
(JSC::MacroAssemblerMIPS::branchTest32):
(JSC::MacroAssemblerMIPS::mask8OnTest):
(JSC::MacroAssemblerMIPS::branchTest8):
(JSC::MacroAssemblerMIPS::branchAdd32):
(JSC::MacroAssemblerMIPS::branchNeg32):
(JSC::MacroAssemblerMIPS::compare32):
(JSC::MacroAssemblerMIPS::test8):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230164
268f45cc-cd09-0410-ab3c-
d52691b4dbfc