[Webkit-unassigned] [Bug 24986] ARM JIT port

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 2 04:08:18 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=24986





------- Comment #67 from zherczeg at inf.u-szeged.hu  2009-07-02 04:08 PDT -------
Hi Gavin,

thank you for the review!

The constant pool is designed to hold both 32 and 64 bit values. However, since
we don't need 64 bit values yet, we decided to omit their helper functions for
now. Of course it is clear for us that supporting constants which size are
longer than the instructions, require special handling. We realized a simple
greedy algorithm is enough for this issue. The size of a new constant is
assigned to m_lastConstDelta, and decreased by the size of the following
instructions until it reaches zero. When a new constant is pushed to the pool
and m_lastConstDelta is non-zero, we use its value to decrease the maximum
allowed difference (also a counter, called m_maxDistance).

For aligning, we chose the padForAlign solution. The other one looks too
complicated (at least for us).

Regarding the "if (10 * m_numConsts > 6 * maxPoolSize / sizeof(uint32_t))"
expression, we divided to constants by 2. However, we still think these
multiplies are not an issue, since we don't plan to support pools bigger than
809 Mbytes. Actually, we feel the size of the pool should not be bigger than 16
Kbytes. Since maxPoolSize is a template argument, a compiler assert to ensure
this maximum allowed size would be a good idea.

We have renamed all functions with abbreviations.

It seems gcc yields several warnings without the UNUSED_PARAM directives. We
hope these unused params will not be in the mainline too long, since we have
already implemented them and post the patch soon into bugzilla. We feel split
the code here is good for a reviewer viewpoint, but we can combine the two
patches if you wish.

We have also removed all our auto-enabling code in "Platform.h". So all ports
can decide whether they want to enable ARM-JIT or not.

We have considered several methods for uninterrupted code sequences. We also
thought about the OpenGL way (begin / endUninterruptedCodeSequence). However,
since we need an extra buffer in this case, we feel the code will become too
complex (and slow). We chose the ensureSpaceFor(getByIdFastCase) method, since
we already have to calculate the patch offsets, so calculating the total size
is only one extra step further (adding the last instruction size to the last
patch offset). And the resulting code is fast as well, since an inlined switch
with a constant argument is automatically evaluated by gcc (we have tested it
on a small program).

Thank you again.
Zoltan


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list