Bug 130025

Summary: [X86_64] Smaller code for sub_ir when register is accumulator.
Product: WebKit Reporter: Andreas Kling <kling>
Component: JavaScriptCoreAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: kling
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Andreas Kling 2014-03-10 09:43:49 PDT
[X86_64] Smaller code for sub_ir when register is accumulator.
Comment 1 Andreas Kling 2014-03-10 09:44:25 PDT
Created attachment 226308 [details]
Patch
Comment 2 Michael Saboff 2014-03-10 10:57:50 PDT
Comment on attachment 226308 [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:37 PDT
(In reply to comment #2)
> (From update of attachment 226308 [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:24:01 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:51:20 PDT
Comment on attachment 226308 [details]
Patch

Clearing flags on attachment: 226308

Committed r165391: <http://trac.webkit.org/changeset/165391>
Comment 6 Andreas Kling 2014-03-10 11:51:22 PDT
All reviewed patches have been landed.  Closing bug.