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

Side by Side Diff: src/ia32/lithium-codegen-ia32.cc

Issue 425943002: Inline Math.fround in optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: arm64 port Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 3706 matching lines...) Expand 10 before | Expand all | Expand 10 after
3717 __ movmskpd(output_reg, input_reg); 3717 __ movmskpd(output_reg, input_reg);
3718 __ test(output_reg, Immediate(1)); 3718 __ test(output_reg, Immediate(1));
3719 __ RecordComment("Minus zero"); 3719 __ RecordComment("Minus zero");
3720 DeoptimizeIf(not_zero, instr->environment()); 3720 DeoptimizeIf(not_zero, instr->environment());
3721 } 3721 }
3722 __ Move(output_reg, Immediate(0)); 3722 __ Move(output_reg, Immediate(0));
3723 __ bind(&done); 3723 __ bind(&done);
3724 } 3724 }
3725 3725
3726 3726
3727 void LCodeGen::DoMathFround(LMathFround* instr) {
3728 XMMRegister input_reg = ToDoubleRegister(instr->value());
3729 XMMRegister output_reg = ToDoubleRegister(instr->result());
3730 __ cvtsd2ss(output_reg, input_reg);
3731 __ cvtss2sd(output_reg, output_reg);
3732 }
3733
3734
3727 void LCodeGen::DoMathSqrt(LMathSqrt* instr) { 3735 void LCodeGen::DoMathSqrt(LMathSqrt* instr) {
3728 Operand input = ToOperand(instr->value()); 3736 Operand input = ToOperand(instr->value());
3729 XMMRegister output = ToDoubleRegister(instr->result()); 3737 XMMRegister output = ToDoubleRegister(instr->result());
3730 __ sqrtsd(output, input); 3738 __ sqrtsd(output, input);
3731 } 3739 }
3732 3740
3733 3741
3734 void LCodeGen::DoMathPowHalf(LMathPowHalf* instr) { 3742 void LCodeGen::DoMathPowHalf(LMathPowHalf* instr) {
3735 XMMRegister xmm_scratch = double_scratch0(); 3743 XMMRegister xmm_scratch = double_scratch0();
3736 XMMRegister input_reg = ToDoubleRegister(instr->value()); 3744 XMMRegister input_reg = ToDoubleRegister(instr->value());
(...skipping 1930 matching lines...) Expand 10 before | Expand all | Expand 10 after
5667 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5675 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5668 RecordSafepoint(Safepoint::kNoLazyDeopt); 5676 RecordSafepoint(Safepoint::kNoLazyDeopt);
5669 } 5677 }
5670 5678
5671 5679
5672 #undef __ 5680 #undef __
5673 5681
5674 } } // namespace v8::internal 5682 } } // namespace v8::internal
5675 5683
5676 #endif // V8_TARGET_ARCH_IA32 5684 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698