Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(460)

Issue 246075: Optimize calls to GenericBinaryStub (Closed)

Created:
11 years, 2 months ago by Søren Thygesen Gjesse
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Optimize calls to GenericBinaryStub. The calls to GenericBinaryStub can now pass the arguments in registers instead of on the stack. It is supported for ADD, SUB, MUL and DIV. The convention in GenericBinaryStub is not changed so the left operand is passed in edx and the right one in eax. When the stub contains smi code arguments are always passed on the stack as the smi code has to have left and right operands on eax and ebx, so moving from edx,eax to eax,ebx is not worth it and the smi code also trashes the registers so if arguments where passed in registers they would have to be saved on the stack anyway. Added flags to disable the use of certain Intel CPU features to make it easier to test different code paths. Committed: http://code.google.com/p/v8/source/detail?r=3041

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 4

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+261 lines, -65 lines) Patch
M src/flag-definitions.h View 1 2 2 chunks +11 lines, -1 line 0 comments Download
M src/ia32/assembler-ia32.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M src/ia32/codegen-ia32.h View 1 2 2 chunks +48 lines, -13 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 1 2 15 chunks +190 lines, -50 lines 0 comments Download
M src/v8-counters.h View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M src/x64/assembler-x64.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Søren Thygesen Gjesse
11 years, 2 months ago (2009-10-02 10:59:49 UTC) #1
Kevin Millikin (Chromium)
LGTM if you address the two comments below. http://codereview.chromium.org/246075/diff/4001/4002 File src/ia32/codegen-ia32.cc (right): http://codereview.chromium.org/246075/diff/4001/4002#newcode830 Line 830: ...
11 years, 2 months ago (2009-10-08 13:16:54 UTC) #2
Søren Thygesen Gjesse
11 years, 2 months ago (2009-10-08 14:21:47 UTC) #3
http://codereview.chromium.org/246075/diff/4001/4002
File src/ia32/codegen-ia32.cc (right):

http://codereview.chromium.org/246075/diff/4001/4002#newcode830
Line 830: __ CallStub(&stub);
On 2009/10/08 13:16:54, Kevin Millikin wrote:
> The call to masm_->CallStub could better go into the stub's
> GeneratePrepareArguments function (and that function should be renamed to
> something like 'Call').
> 
> I wonder if there's a simple way to assert that the preparation is done before
> someone tries to CallStub?

Changed the name to GenerateCall and included the macro assembler call to
CallStub.

http://codereview.chromium.org/246075/diff/4001/4003
File src/ia32/codegen-ia32.h (right):

http://codereview.chromium.org/246075/diff/4001/4003#newcode624
Line 624: // The flags ARGS_IN_REGISTERS and ARGS_REVERSED are used internally.
On 2009/10/08 13:16:54, Kevin Millikin wrote:
> Since they are not flags passed to the constructor, they do not need to go in
> the enum type, and be encoded as separate bits in the key.  You can then avoid
> the following assert. 

Removed flags from the enum and added them as private bool fields instead.

Powered by Google App Engine
This is Rietveld 408576698