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

Issue 6246099: X64 Crankshaft: Add bit operations and shifts to x64 crankshaft. (Closed)

Created:
9 years, 10 months ago by William Hesse
Modified:
9 years, 7 months ago
Reviewers:
Lasse Reichstein
CC:
v8-dev
Visibility:
Public.

Description

X64 Crankshaft: Add bit operations and shifts to x64 crankshaft. Committed: http://code.google.com/p/v8/source/detail?r=6632

Patch Set 1 #

Total comments: 1

Patch Set 2 : '' #

Total comments: 8

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+211 lines, -22 lines) Patch
M src/x64/assembler-x64.h View 1 2 2 chunks +16 lines, -0 lines 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 2 4 chunks +111 lines, -5 lines 0 comments Download
M src/x64/lithium-x64.cc View 1 2 4 chunks +84 lines, -17 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
William Hesse
9 years, 10 months ago (2011-02-04 09:22:27 UTC) #1
Lasse Reichstein
LGTM http://codereview.chromium.org/6246099/diff/5/src/x64/lithium-codegen-x64.cc File src/x64/lithium-codegen-x64.cc (right): http://codereview.chromium.org/6246099/diff/5/src/x64/lithium-codegen-x64.cc#newcode679 src/x64/lithium-codegen-x64.cc:679: __ testl(ToRegister(left), Immediate(0x80000000)); Seems wasteful to compare to ...
9 years, 10 months ago (2011-02-04 09:51:24 UTC) #2
William Hesse
9 years, 10 months ago (2011-02-04 14:37:12 UTC) #3
http://codereview.chromium.org/6246099/diff/1/src/x64/lithium-codegen-x64.cc
File src/x64/lithium-codegen-x64.cc (right):

http://codereview.chromium.org/6246099/diff/1/src/x64/lithium-codegen-x64.cc#...
src/x64/lithium-codegen-x64.cc:263: }
Indentation fixed.

http://codereview.chromium.org/6246099/diff/5/src/x64/lithium-codegen-x64.cc#...
src/x64/lithium-codegen-x64.cc:679: __ testl(ToRegister(left),
Immediate(0x80000000));
On 2011/02/04 09:51:25, Lasse Reichstein wrote:
> Seems wasteful to compare to a 4-byte literal.
> Just do 
>   testl(ToRegister(left), ToRegister(left));
>   DeoptimizeIf(negative, ...)
> 
> Maybe cache the result of ToRegister(left), instead of calling it multiple
> times.

Done.

http://codereview.chromium.org/6246099/diff/5/src/x64/lithium-codegen-x64.cc#...
src/x64/lithium-codegen-x64.cc:701: __ testl(ToRegister(left),
Immediate(0x80000000));
On 2011/02/04 09:51:25, Lasse Reichstein wrote:
> Test to self and deopt if negative here too.

Done.

http://codereview.chromium.org/6246099/diff/5/src/x64/lithium-x64.cc
File src/x64/lithium-x64.cc (right):

http://codereview.chromium.org/6246099/diff/5/src/x64/lithium-x64.cc#newcode762
src/x64/lithium-x64.cc:762: LOperand* left = UseFixed(instr->left(), rdx);
Yes.
On 2011/02/04 09:51:25, Lasse Reichstein wrote:
> Why fixed registers? Is it to match the calling convention of the binary op
> stub?

http://codereview.chromium.org/6246099/diff/5/src/x64/lithium-x64.cc#newcode799
src/x64/lithium-x64.cc:799: // by 0 and the result cannot be truncated to int32.
This is the way it is done on all the other platforms.
On 2011/02/04 09:51:25, Lasse Reichstein wrote:
> It's a little tricky to have a constant value that happens to be zero when the
> operand isn't constant. The "constant_value" variable should be meaningless in
> that case.
> 
> How about a binary flag that says 
>  bool can_deopt = (op == Token::SHR);
> and inside if (right_value->IsConstant), set it to false if the constant is
> non-zero.

Powered by Google App Engine
This is Rietveld 408576698