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

Issue 2815028: X64: Remove more fpu code. Unroll more local initialization loops. (Closed)

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

Description

X64: Remove more fpu code. Unroll more local initialization loops.

Patch Set 1 #

Total comments: 6

Patch Set 2 : Addressed review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -63 lines) Patch
M src/x64/assembler-x64.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/x64/assembler-x64.cc View 1 chunk +22 lines, -0 lines 0 comments Download
M src/x64/codegen-x64.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/x64/ic-x64.cc View 3 chunks +13 lines, -53 lines 0 comments Download
M src/x64/virtual-frame-x64.h View 1 chunk +1 line, -1 line 0 comments Download
M src/x64/virtual-frame-x64.cc View 1 1 chunk +28 lines, -8 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Lasse Reichstein
Only FPU code left is transcendental functions and fmod.
10 years, 6 months ago (2010-06-24 07:38:10 UTC) #1
William Hesse
LGTM. http://codereview.chromium.org/2815028/diff/1/6 File src/x64/virtual-frame-x64.cc (right): http://codereview.chromium.org/2815028/diff/1/6#newcode119 src/x64/virtual-frame-x64.cc:119: // For less locals the unrolled loop is ...
10 years, 6 months ago (2010-06-24 07:56:25 UTC) #2
Lasse Reichstein
10 years, 6 months ago (2010-06-24 09:02:24 UTC) #3
http://codereview.chromium.org/2815028/diff/1/6
File src/x64/virtual-frame-x64.cc (right):

http://codereview.chromium.org/2815028/diff/1/6#newcode119
src/x64/virtual-frame-x64.cc:119: // For less locals the unrolled loop is more
compact.
Fixed.

http://codereview.chromium.org/2815028/diff/1/6#newcode124
src/x64/virtual-frame-x64.cc:124: ASSERT(tmp.is_valid());
Probably not. This code happens on entry to the function, so it's incredibly
likely that one of the first four registers are free, and if it happens most of
the time, it's fine (I'm guessing there is really a 100% chance of getting rax,
but I'm still satisfied if it's only 90%). Also, it only cost one extra byte per
push if we fail to get one of the low registers, and if there are many pushes,
we go to the loop anyway, so the damage is minimal.
This is really a micro-optimization for code size in the common case more than
anything else.

http://codereview.chromium.org/2815028/diff/1/6#newcode141
src/x64/virtual-frame-x64.cc:141: __ movb(cnt.reg(), Immediate(count));
There should be no partial register read stalls on intel processors, since we
only read the part we just wrote (there is no need to merge partial registers).
On AMD processors there should be no problem either, since it always merges
immediately, and there is no dependencies that we have to wait for.

Powered by Google App Engine
This is Rietveld 408576698