[Webkit-unassigned] [Bug 115722] [sh4] Take advantage of pre-decrement and post-increment opcodes for sh4 base JIT
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue May 7 09:07:39 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=115722
--- Comment #6 from Julien Brianceau <jbrianceau at nds.com> 2013-05-07 09:06:02 PST ---
(From update of attachment 200892)
View in context: https://bugs.webkit.org/attachment.cgi?id=200892&action=review
>> Source/JavaScriptCore/assembler/MacroAssemblerSH4.h:1043
>> + m_assembler.loadConstant(address.offset + 8, scr);
>
> wat?
Before patch we had something like:
1. load effective address in scr
2. store first part of the double at address scr
3. add 4 to scr
4. store second part of the double at address scr
With patch, I do this as it is in LLINT:
1. load effective address + 8 in scr
2. store the second part of the double at address scr with predecrement of scr (-4)
3. store the first part of the double at address scr with predecrement of scr (-4)
Result is the same but we save one opcode.
>> Source/JavaScriptCore/assembler/MacroAssemblerSH4.h:1057
>> + add32(TrustedImm32(address.offset + 8), scr);
>
> again wat?
Same idea (and I removed the if, because this case is already checked in add32() function).
>> Source/JavaScriptCore/assembler/MacroAssemblerSH4.h:1170
>> + m_assembler.ensureSpace(m_assembler.maxInstructionSize + 58, sizeof(uint32_t));
>
> This magic constant scares me, what is it?
It scares me too :/
More information about the webkit-unassigned
mailing list