Bug 130024 - [X86_64] Smaller code for add_ir when register is accumulator.
Summary: [X86_64] Smaller code for add_ir when register is accumulator.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-10 09:39 PDT by Andreas Kling
Modified: 2014-03-10 11:50 PDT (History)
1 user (show)

See Also:


Attachments
Patch (2.27 KB, patch)
2014-03-10 09:40 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2014-03-10 09:39:28 PDT
[X86_64] Smaller code for add_ir when register is accumulator.
Comment 1 Andreas Kling 2014-03-10 09:40:23 PDT
Created attachment 226307 [details]
Patch
Comment 2 Michael Saboff 2014-03-10 11:00:49 PDT
Comment on attachment 226307 [details]
Patch

What about the CAN_SIGN_EXTEND_8_32(imm) cases and adding the 8 byte immediate variants?
Comment 3 Andreas Kling 2014-03-10 11:17:49 PDT
(In reply to comment #2)
> (From update of attachment 226307 [details])
> What about the CAN_SIGN_EXTEND_8_32(imm) cases and adding the 8 byte immediate variants?

The 8 byte immediate variant adds to AL only, and not the upper part of the accumulator.
Comment 4 Andreas Kling 2014-03-10 11:23:51 PDT
Oh oops, I was thinking about 8-bit, not 8 byte. From reading the Intel manual, it looks like the "ADD r/m32,imm8" variant is the shortest possible instruction in that path.
Comment 5 Andreas Kling 2014-03-10 11:50:41 PDT
Comment on attachment 226307 [details]
Patch

Clearing flags on attachment: 226307

Committed r165390: <http://trac.webkit.org/changeset/165390>
Comment 6 Andreas Kling 2014-03-10 11:50:43 PDT
All reviewed patches have been landed.  Closing bug.