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

Issue 6532054: X64 Crankshaft: Implement MathRound, MathFloor, MathSqrt, and MathPowHalf Una... (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: Implement MathRound, MathFloor, MathSqrt, and MathPowHalf UnaryMathOperations in optimizing code generator. Remove unneeded bailout on Math.pow(-0, 0.5) from ia32 and x64 platforms - we produce the correct value without bailing out. Committed: http://code.google.com/p/v8/source/detail?r=6856

Patch Set 1 #

Total comments: 4

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -13 lines) Patch
M src/ia32/lithium-codegen-ia32.cc View 1 1 chunk +0 lines, -5 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 2 chunks +87 lines, -5 lines 0 comments Download
M src/x64/lithium-x64.cc View 1 1 chunk +24 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
William Hesse
9 years, 10 months ago (2011-02-18 13:35:19 UTC) #1
Lasse Reichstein
LGTM. http://codereview.chromium.org/6532054/diff/1/src/x64/lithium-codegen-x64.cc File src/x64/lithium-codegen-x64.cc (right): http://codereview.chromium.org/6532054/diff/1/src/x64/lithium-codegen-x64.cc#newcode2097 src/x64/lithium-codegen-x64.cc:2097: __ cvttsd2si(output_reg, input_reg); Use the "q" version, so ...
9 years, 10 months ago (2011-02-18 14:13:47 UTC) #2
William Hesse
9 years, 10 months ago (2011-02-18 14:33:28 UTC) #3
http://codereview.chromium.org/6532054/diff/1/src/x64/lithium-codegen-x64.cc
File src/x64/lithium-codegen-x64.cc (right):

http://codereview.chromium.org/6532054/diff/1/src/x64/lithium-codegen-x64.cc#...
src/x64/lithium-codegen-x64.cc:2097: __ cvttsd2si(output_reg, input_reg);
On 2011/02/18 14:13:47, Lasse Reichstein wrote:
> Use the "q" version, so you can properly handle min-int.
But then we have much more complicated tests, because integers not in the 32-bit
range are generated without overflow.  The output is an untagged int32.

http://codereview.chromium.org/6532054/diff/1/src/x64/lithium-codegen-x64.cc#...
src/x64/lithium-codegen-x64.cc:2113: __ movsd(xmm_scratch,
Operand(kScratchRegister, 0));
On 2011/02/18 14:13:47, Lasse Reichstein wrote:
> Why load from memory when we have 64-bit immediates. Just load the bit-pattern
> into a scratch register and then to an XMM register.

Done.

Powered by Google App Engine
This is Rietveld 408576698