Bug 65095 - X86-64 assembler emits three instructions instead of two for certain loads and stores
Summary: X86-64 assembler emits three instructions instead of two for certain loads an...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-24 22:54 PDT by Filip Pizlo
Modified: 2011-07-25 10:59 PDT (History)
3 users (show)

See Also:


Attachments
the patch (2.81 KB, patch)
2011-07-24 22:59 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2011-07-24 22:54:16 PDT
The only X86-64 instructions for storing to, or loading from, 64-bit absolute immediate addresses require that the source of the store (or the target of the load) is EAX.  If the X86-64 assembler in JSC is asked to emit code for storing, or loading, an absolute immediate address where the register containing the value is not EAX, it will emit two additional instructions to swap values between EAX and the requested register.  This is not as efficient as simply moving the 64-bit address into the assembler's scratch register, which would result in two instructions.
Comment 1 Filip Pizlo 2011-07-24 22:59:22 PDT
Created attachment 101850 [details]
the patch
Comment 2 WebKit Review Bot 2011-07-25 10:59:21 PDT
Comment on attachment 101850 [details]
the patch

Clearing flags on attachment: 101850

Committed r91678: <http://trac.webkit.org/changeset/91678>
Comment 3 WebKit Review Bot 2011-07-25 10:59:25 PDT
All reviewed patches have been landed.  Closing bug.