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

Issue 13426006: Improvements for x87 stack handling (Closed)

Created:
7 years, 8 months ago by mvstanton
Modified:
7 years, 8 months ago
Reviewers:
danno
CC:
v8-dev
Visibility:
Public.

Description

Improvements for x87 stack handling BUG= Committed: https://code.google.com/p/v8/source/detail?r=14179

Patch Set 1 #

Patch Set 2 : Improvements #

Total comments: 32

Patch Set 3 : Removed unrelated changes #

Patch Set 4 : Review updates #

Total comments: 7

Patch Set 5 : Review updates #

Total comments: 9

Patch Set 6 : Last comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+854 lines, -174 lines) Patch
M src/hydrogen-instructions.h View 1 2 3 4 5 4 chunks +25 lines, -3 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.h View 1 2 3 4 5 5 chunks +21 lines, -3 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 2 3 4 5 20 chunks +565 lines, -115 lines 0 comments Download
M src/ia32/lithium-gap-resolver-ia32.cc View 1 2 3 2 chunks +51 lines, -21 lines 0 comments Download
M src/ia32/lithium-ia32.h View 1 2 3 9 chunks +65 lines, -0 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 1 2 3 4 5 8 chunks +91 lines, -28 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 2 3 4 5 1 chunk +22 lines, -0 lines 0 comments Download
M src/lithium-allocator.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/objects.h View 1 chunk +2 lines, -0 lines 0 comments Download
A + test/mjsunit/external-array-no-sse2.js View 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/pixel-array-rounding.js View 2 chunks +7 lines, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
mvstanton
Hi Danno, Here is the x87 work. There is a TODO in EmitNumberUntagD for -0.0 ...
7 years, 8 months ago (2013-04-08 12:17:01 UTC) #1
danno
https://codereview.chromium.org/13426006/diff/7001/src/hydrogen-instructions.h File src/hydrogen-instructions.h (right): https://codereview.chromium.org/13426006/diff/7001/src/hydrogen-instructions.h#newcode3232 src/hydrogen-instructions.h:3232: return !representation().IsDouble() || ImmortalImmovable(); Maybe it's better to factor ...
7 years, 8 months ago (2013-04-08 12:57:27 UTC) #2
mvstanton
Hi Danno, Updates applied. Tests including a noenable_sse2 run successful. I kept the code in ...
7 years, 8 months ago (2013-04-08 16:10:14 UTC) #3
danno
https://codereview.chromium.org/13426006/diff/19011/src/hydrogen-instructions.h File src/hydrogen-instructions.h (right): https://codereview.chromium.org/13426006/diff/19011/src/hydrogen-instructions.h#newcode3194 src/hydrogen-instructions.h:3194: ASSERT(has_double_value_); Any reason this has to be an assert? ...
7 years, 8 months ago (2013-04-08 20:51:20 UTC) #4
mvstanton
Thanks, Danno, comments applied. https://codereview.chromium.org/13426006/diff/19011/src/hydrogen-instructions.h File src/hydrogen-instructions.h (right): https://codereview.chromium.org/13426006/diff/19011/src/hydrogen-instructions.h#newcode3194 src/hydrogen-instructions.h:3194: ASSERT(has_double_value_); On 2013/04/08 20:51:21, danno ...
7 years, 8 months ago (2013-04-09 07:13:08 UTC) #5
danno
lgtm with comments https://codereview.chromium.org/13426006/diff/26001/src/hydrogen-instructions.h File src/hydrogen-instructions.h (right): https://codereview.chromium.org/13426006/diff/26001/src/hydrogen-instructions.h#newcode3204 src/hydrogen-instructions.h:3204: nit: remove added whitespace https://codereview.chromium.org/13426006/diff/26001/src/ia32/lithium-codegen-ia32.cc File ...
7 years, 8 months ago (2013-04-09 07:37:07 UTC) #6
mvstanton
Committed patchset #6 manually as r14179 (presubmit successful).
7 years, 8 months ago (2013-04-09 08:43:13 UTC) #7
mvstanton
7 years, 8 months ago (2013-04-09 08:49:13 UTC) #8
Message was sent while issue was closed.
Committed, thx for the review!

https://codereview.chromium.org/13426006/diff/26001/src/ia32/lithium-codegen-...
File src/ia32/lithium-codegen-ia32.cc (right):

https://codereview.chromium.org/13426006/diff/26001/src/ia32/lithium-codegen-...
src/ia32/lithium-codegen-ia32.cc:370: if (!CpuFeatures::IsSupported(SSE2)) {
On 2013/04/09 07:37:07, danno wrote:
> nit: How about putting the following 7 lines in a utility function called
> "FlushX87StackIfNecessary?"

Done.

https://codereview.chromium.org/13426006/diff/26001/src/ia32/lithium-codegen-...
src/ia32/lithium-codegen-ia32.cc:386: // Make sure the floating point stack is
either empty or has one item,
On 2013/04/09 07:37:07, danno wrote:
> This code might be useful elsewhere. How about putting it into the
> macro-assembler in a function called "CheckX87StackIsEmpty()"

Done with a variant: I also check if the stack has one item, so I generalized it
to VerifyX87StackDepth(uint depth), that way we can verify any expected depth.

https://codereview.chromium.org/13426006/diff/26001/src/ia32/lithium-gap-reso...
File src/ia32/lithium-gap-resolver-ia32.cc (right):

https://codereview.chromium.org/13426006/diff/26001/src/ia32/lithium-gap-reso...
src/ia32/lithium-gap-resolver-ia32.cc:378: cgen_->PopX87();
On 2013/04/09 07:37:07, danno wrote:
> Slightly faster might be to just store rather that pop and store with a
push...
> but it's probably not important.

Hmm, I'm looking at the x87 instructions, and all variants of the fld
instruction do something like a push, so I'd end up with two items on the stack.
I don't see an "overwrite" instruction or mode.

But agreed, this area will look different with N slots to play with instead of
just 1.

https://codereview.chromium.org/13426006/diff/26001/src/ia32/lithium-ia32.cc
File src/ia32/lithium-ia32.cc (right):

https://codereview.chromium.org/13426006/diff/26001/src/ia32/lithium-ia32.cc#...
src/ia32/lithium-ia32.cc:2270: } else {
On 2013/04/09 07:37:07, danno wrote:
> nit: no need for the additional scope, just do a "else if"

Done.

Powered by Google App Engine
This is Rietveld 408576698