Bug 23715 - Simplify MacroAssember interface.
Summary: Simplify MacroAssember interface.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Gavin Barraclough
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-03 14:39 PST by Gavin Barraclough
Modified: 2009-02-03 18:02 PST (History)
0 users

See Also:


Attachments
The patch (108.14 KB, patch)
2009-02-03 14:49 PST, Gavin Barraclough
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Barraclough 2009-02-03 14:39:54 PST
One big candidate are all the branch & other conditional operations.  By parameterizing these methods on the comparison operation, we can significantly reduce replication of code, and simplify the code generation interface.

Another trivial fix is to stop the Scale of BaseIndex addresses as being passed as multiplicands (1,2,4,8), and instead use a plain enum (0,1,2,3).  This is likely more useful encoding, and can be more trivial converted to a multiplicand where necessary.
Comment 1 Gavin Barraclough 2009-02-03 14:49:41 PST
Created attachment 27293 [details]
The patch
Comment 2 Geoffrey Garen 2009-02-03 15:20:41 PST
Comment on attachment 27293 [details]
The patch

r=me
Comment 3 Geoffrey Garen 2009-02-03 15:21:15 PST
Our style guidelines say that "jcc" should be "jCC" and "setcc" should be "setCC".
Comment 4 Gavin Barraclough 2009-02-03 18:02:44 PST
Sending        JavaScriptCore/ChangeLog
Sending        JavaScriptCore/assembler/MacroAssembler.h
Sending        JavaScriptCore/assembler/X86Assembler.h
Sending        JavaScriptCore/jit/JIT.cpp
Sending        JavaScriptCore/jit/JITArithmetic.cpp
Sending        JavaScriptCore/jit/JITCall.cpp
Sending        JavaScriptCore/jit/JITInlineMethods.h
Sending        JavaScriptCore/jit/JITPropertyAccess.cpp
Sending        JavaScriptCore/runtime/RegExp.cpp
Sending        JavaScriptCore/wrec/WRECGenerator.cpp
Transmitting file data ..........
Committed revision 40562.