Closed
Bug 1115754
Opened 10 years ago
Closed 9 years ago
Misc assembler optimizations
Categories
(Core :: JavaScript Engine: JIT, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla37
People
(Reporter: sunfish, Assigned: sunfish)
Details
Attachments
(4 files)
16.55 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
3.80 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
5.35 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
8.55 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
The following patches implement a variety of low-level x86 encoding optimizations. First is a patch implementing optimized %eax encodings.
Attachment #8541752 -
Flags: review?(jdemooij)
Assignee | ||
Comment 1•10 years ago
|
||
This patch optimizes movaps/movapd/movdqa to use 2-byte VEX prefixes instead of 3-byte ones in more cases.
Attachment #8541771 -
Flags: review?(jdemooij)
Assignee | ||
Comment 2•10 years ago
|
||
This implements the %eax encoding optimizations for mov instructions.
Attachment #8541776 -
Flags: review?(jdemooij)
Assignee | ||
Comment 3•10 years ago
|
||
This patch enables the use of 8-bit jump displacements for jumps where the destination is known (e.g. loop backedges).
Attachment #8541780 -
Flags: review?(jdemooij)
Assignee | ||
Updated•10 years ago
|
OS: Linux → All
Updated•10 years ago
|
Attachment #8541752 -
Flags: review?(jdemooij) → review+
Comment 4•10 years ago
|
||
Comment on attachment 8541771 [details] [diff] [review] vex-shrink-moves.patch Review of attachment 8541771 [details] [diff] [review]: ----------------------------------------------------------------- Clever.
Attachment #8541771 -
Flags: review?(jdemooij) → review+
Updated•10 years ago
|
Attachment #8541776 -
Flags: review?(jdemooij) → review+
Comment 5•10 years ago
|
||
Comment on attachment 8541780 [details] [diff] [review] jump-shrink.patch Review of attachment 8541780 [details] [diff] [review]: ----------------------------------------------------------------- Great, also nice cleanup. ::: js/src/jit/shared/BaseAssembler-x86-shared.h @@ +2884,5 @@ > + int32_t diff = dst.offset() - m_formatter.size(); > + spew("jmp .Llabel%d", dst.offset()); > + > + // The jump immediate is an offset from the end of the jump instruction. > + // An jump instrution is either 1 byte opcode and 1 byte offset, or 1 Nit: A jump instruction @@ +2944,5 @@ > + int32_t diff = dst.offset() - m_formatter.size(); > + spew("j%s .Llabel%d", nameCC(cond), dst.offset()); > + > + // The jump immediate is an offset from the end of the jump instruction. > + // A conditional jump instrution is either 1 byte opcode and 1 byte Nit: instruction (typo)
Attachment #8541780 -
Flags: review?(jdemooij) → review+
Assignee | ||
Comment 6•9 years ago
|
||
Nits fixed. Thanks! https://hg.mozilla.org/integration/mozilla-inbound/rev/e5fbd8b624be https://hg.mozilla.org/integration/mozilla-inbound/rev/39d80080db1c https://hg.mozilla.org/integration/mozilla-inbound/rev/e6bd5d58f68a https://hg.mozilla.org/integration/mozilla-inbound/rev/f6335334bbe8
Comment 7•9 years ago
|
||
Comment on attachment 8541780 [details] [diff] [review] jump-shrink.patch Review of attachment 8541780 [details] [diff] [review]: ----------------------------------------------------------------- We should have a way to enforce an absolute address for jumpWithPatch, or a way to ensure that we will SEGV if we ever try to insert a larger address than what is acceptable by the jump size. Note that loop backedges are patchable in order to handle interuption callbacks.
Comment 8•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f6335334bbe8 https://hg.mozilla.org/mozilla-central/rev/e6bd5d58f68a https://hg.mozilla.org/mozilla-central/rev/39d80080db1c https://hg.mozilla.org/mozilla-central/rev/e5fbd8b624be
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in
before you can comment on or make changes to this bug.
Description
•