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

Issue 2885018: X64: Added register holding Smi::FromInt(1). (Closed)

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

Description

X64: Added register holding Smi::FromInt(1). Don't use r15 for anything any more.

Patch Set 1 #

Total comments: 11

Patch Set 2 : Addressed review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+331 lines, -135 lines) Patch
M src/x64/builtins-x64.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M src/x64/codegen-x64.cc View 16 chunks +42 lines, -27 lines 0 comments Download
M src/x64/frames-x64.h View 1 chunk +4 lines, -0 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 4 chunks +22 lines, -4 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 22 chunks +149 lines, -48 lines 0 comments Download
M src/x64/register-allocator-x64.h View 1 chunk +1 line, -1 line 0 comments Download
M src/x64/register-allocator-x64-inl.h View 3 chunks +6 lines, -5 lines 0 comments Download
M test/cctest/test-macro-assembler-x64.cc View 1 52 chunks +107 lines, -46 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Lasse Reichstein
10 years, 5 months ago (2010-07-02 10:30:55 UTC) #1
William Hesse
LGTM. http://codereview.chromium.org/2885018/diff/1/3 File src/x64/codegen-x64.cc (right): http://codereview.chromium.org/2885018/diff/1/3#newcode9965 src/x64/codegen-x64.cc:9965: // TODO(X64): On Win64, if we ever use ...
10 years, 5 months ago (2010-07-02 12:24:07 UTC) #2
Lasse Reichstein
10 years, 5 months ago (2010-07-02 13:06:52 UTC) #3
http://codereview.chromium.org/2885018/diff/1/5
File src/x64/macro-assembler-x64.cc (right):

http://codereview.chromium.org/2885018/diff/1/5#newcode559
src/x64/macro-assembler-x64.cc:559: //imul(dst, kSmiConstantRegister,
Immediate(value));
Ack, yes.

http://codereview.chromium.org/2885018/diff/1/5#newcode727
src/x64/macro-assembler-x64.cc:727: // Make mask 0x8000000000000001 and test
that both bits are zero.
I used lea instead of movl(.., Immediate(3)) since the latter is actually longer
(the immediate must be 4 bytes).
I don't want to use more rotates than necessary (although concern for the P4
might not be that necessary these days), and the second rotate clobbers the
flags from the src.

I think the first one is probably the best one.

http://codereview.chromium.org/2885018/diff/1/5#newcode775
src/x64/macro-assembler-x64.cc:775: cmpq(kScratchRegister, src);
Good one!

http://codereview.chromium.org/2885018/diff/1/5#newcode886
src/x64/macro-assembler-x64.cc:886: subq(src1, kScratchRegister);
The current version should be slightly better on an i7, due to cmp/j macro-op
fusion (sadly it doesn't exist on earlier chips in 64-bit mode).

http://codereview.chromium.org/2885018/diff/1/9
File test/cctest/test-macro-assembler-x64.cc (right):

http://codereview.chromium.org/2885018/diff/1/9#newcode103
test/cctest/test-macro-assembler-x64.cc:103: __
pop(v8::internal::kSmiConstantRegister);
Sure.

Powered by Google App Engine
This is Rietveld 408576698