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

Issue 6602007: Add MathPowStub to x64 platform, and fix error in stub on ia32 platform. (Closed)

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

Description

Add MathPowStub to x64 platform, and fix error in stub on ia32 platform. Committed: http://code.google.com/p/v8/source/detail?r=6973

Patch Set 1 #

Total comments: 10

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+161 lines, -10 lines) Patch
M src/ia32/code-stubs-ia32.cc View 3 chunks +2 lines, -3 lines 0 comments Download
M src/x64/code-stubs-x64.cc View 1 3 chunks +155 lines, -4 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 1 chunk +2 lines, -1 line 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
William Hesse
9 years, 9 months ago (2011-02-28 11:32:31 UTC) #1
Lasse Reichstein
LGTM http://codereview.chromium.org/6602007/diff/1/src/x64/code-stubs-x64.cc File src/x64/code-stubs-x64.cc (right): http://codereview.chromium.org/6602007/diff/1/src/x64/code-stubs-x64.cc#newcode2090 src/x64/code-stubs-x64.cc:2090: CpuFeatures::Scope use_sse2(SSE2); No need to have SSE2 scopes ...
9 years, 9 months ago (2011-02-28 13:21:41 UTC) #2
William Hesse
9 years, 9 months ago (2011-02-28 14:36:11 UTC) #3
http://codereview.chromium.org/6602007/diff/1/src/x64/code-stubs-x64.cc
File src/x64/code-stubs-x64.cc (right):

http://codereview.chromium.org/6602007/diff/1/src/x64/code-stubs-x64.cc#newco...
src/x64/code-stubs-x64.cc:2154: __ movl(rcx, Immediate(0x7FB00000));
We now divide first, then compare to 0.


On 2011/02/28 13:21:41, Lasse Reichstein wrote:
> Could you detect infinity by adding the value to itself and see that it
doesn't
> change? (Need to filter out zero at the beginning then, ofcourse).


> Or subtract it from itself and not get zero (but NaN)?

http://codereview.chromium.org/6602007/diff/1/src/x64/code-stubs-x64.cc#newco...
src/x64/code-stubs-x64.cc:2160: __ movsd(xmm1, xmm3);
On 2011/02/28 13:21:41, Lasse Reichstein wrote:
> It's worth noticing that if xmm1 is very small, the division might give
Infinity
> - but that's the correct result for the operation.

Done.

http://codereview.chromium.org/6602007/diff/1/src/x64/code-stubs-x64.cc#newco...
src/x64/code-stubs-x64.cc:2189: __ j(greater_equal, &call_runtime);
The value b^infinity depends on whether b is >, =, or < 1, and >, =, or < 0.  It
is complicated.

On 2011/02/28 13:21:41, Lasse Reichstein wrote:
> If the value isn't -Infinity, won't the result be NaN/Infinity too. We
shouldn't
> need to go to runtime. 
> It's only if it's -Infinity that we need to do something (and I have no idea
> what :).

http://codereview.chromium.org/6602007/diff/1/src/x64/code-stubs-x64.cc#newco...
src/x64/code-stubs-x64.cc:2197: __ movl(rcx, Immediate(0xBF000000));
Changed.

On 2011/02/28 13:21:41, Lasse Reichstein wrote:
> Is this smaller than loading the exact representation of 1/2 as 64-bit?

Powered by Google App Engine
This is Rietveld 408576698