[Webkit-unassigned] [Bug 233474] [JSC] Generated code size reductions for baseline JIT (all architectures)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Dec 2 03:06:20 PST 2021
https://bugs.webkit.org/show_bug.cgi?id=233474
--- Comment #6 from Geza Lore <glore at igalia.com> ---
Comment on attachment 445419
--> https://bugs.webkit.org/attachment.cgi?id=445419
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=445419&action=review
>> Source/JavaScriptCore/assembler/ARMv7Assembler.h:1268
>> + ASSERT(!(offset & 0x3));
>
> According to ARM Architecture Reference Manual, https://developer.arm.com/documentation/ddi0406/b/Application-Level-Architecture/Instruction-Details/Alphabetical-list-of-instructions/LDRD--register-?lang=en
> <Rt>
> The first destination register. This register must be even-numbered and not R14.
>
> <Rt2>
> The second destination register. This register must be <R(t+1)>.
>
> So, let's add assertions for the above condition.
> ASSERT(rt2 == rt + 1);
> ASSERT(rt % 2 == 0);
> ASSERT(rt != r14);
As discussed, these constraints do not apply to the Thumb-2 instruction set. See "Encoding T1" here:
https://developer.arm.com/documentation/ddi0406/b/Application-Level-Architecture/Instruction-Details/Alphabetical-list-of-instructions/LDRD--immediate-?lang=en
>> Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h:62
>> + RegisterID scratchRegister() { return addressTempRegister; }
>
> Can you review all places using this scratchRegister? I think it is possible that some places are using addressTempRegister and scratchRegister(), and in that case, this change breaks it.
I did review these, all current uses are fine. We should also fix https://bugs.webkit.org/show_bug.cgi?id=232373 at some point, but this change does not make the situation worse than it is.
>> Source/JavaScriptCore/jit/AssemblyHelpers.h:216
>> + static_assert((PayloadOffset == 4 && !TagOffset) || (!PayloadOffset && TagOffset == 4));
>
> You can insert static_assert that,
>
> static_assert(!PayloadOffset && TagOffset == 4)
>
> because we never enable JIT on BigEndian environments.
Ah, great to know not having to worry about BigEndian, thanks!
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211202/3b9aa61a/attachment.htm>
More information about the webkit-unassigned
mailing list