Commit 0e8a5fe4 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Fix math.round with SSE4.1.

R=verwaest@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/12388015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13771 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 5c264ade
......@@ -3755,7 +3755,7 @@ void LCodeGen::DoMathRound(LUnaryMathOperation* instr) {
CpuFeatures::Scope scope(SSE4_1);
__ addsd(xmm_scratch, input_reg);
__ roundsd(xmm_scratch, input_reg, Assembler::kRoundDown);
__ roundsd(xmm_scratch, xmm_scratch, Assembler::kRoundDown);
__ cvttsd2si(output_reg, Operand(xmm_scratch));
// Overflow is signalled with minint.
__ cmp(output_reg, 0x80000000u);
......
......@@ -3543,7 +3543,7 @@ void LCodeGen::DoMathRound(LUnaryMathOperation* instr) {
if (CpuFeatures::IsSupported(SSE4_1) && !minus_zero_check) {
CpuFeatures::Scope scope(SSE4_1);
__ addsd(xmm_scratch, input_reg);
__ roundsd(xmm_scratch, input_reg, Assembler::kRoundDown);
__ roundsd(xmm_scratch, xmm_scratch, Assembler::kRoundDown);
__ cvttsd2si(output_reg, xmm_scratch);
// Overflow is signalled with minint.
__ cmpl(output_reg, Immediate(0x80000000));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment