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

Side by Side Diff: src/crankshaft/x64/lithium-codegen-x64.cc

Issue 2204963002: [wasm] Use the Float64Max/Min machine operators to implement F64Max/Min. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/crankshaft/x64/lithium-codegen-x64.h" 7 #include "src/crankshaft/x64/lithium-codegen-x64.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 4675 matching lines...) Expand 10 before | Expand all | Expand 10 after
4686 __ jmp(&done, Label::kNear); 4686 __ jmp(&done, Label::kNear);
4687 4687
4688 if (can_convert_undefined_to_nan) { 4688 if (can_convert_undefined_to_nan) {
4689 __ bind(&convert); 4689 __ bind(&convert);
4690 4690
4691 // Convert undefined (and hole) to NaN. Compute NaN as 0/0. 4691 // Convert undefined (and hole) to NaN. Compute NaN as 0/0.
4692 __ CompareRoot(input_reg, Heap::kUndefinedValueRootIndex); 4692 __ CompareRoot(input_reg, Heap::kUndefinedValueRootIndex);
4693 DeoptimizeIf(not_equal, instr, 4693 DeoptimizeIf(not_equal, instr,
4694 DeoptimizeReason::kNotAHeapNumberUndefined); 4694 DeoptimizeReason::kNotAHeapNumberUndefined);
4695 4695
4696 __ Pcmpeqd(result_reg, result_reg); 4696 __ xorpd(result_reg, result_reg);
Benedikt Meurer 2016/08/03 03:24:34 Please use Xorpd and Divsd here.
ahaas 2016/08/03 07:17:14 Done.
4697 __ divsd(result_reg, result_reg);
4697 __ jmp(&done, Label::kNear); 4698 __ jmp(&done, Label::kNear);
4698 } 4699 }
4699 } else { 4700 } else {
4700 DCHECK(mode == NUMBER_CANDIDATE_IS_SMI); 4701 DCHECK(mode == NUMBER_CANDIDATE_IS_SMI);
4701 } 4702 }
4702 4703
4703 // Smi to XMM conversion 4704 // Smi to XMM conversion
4704 __ bind(&load_smi); 4705 __ bind(&load_smi);
4705 __ SmiToInteger32(kScratchRegister, input_reg); 4706 __ SmiToInteger32(kScratchRegister, input_reg);
4706 __ Cvtlsi2sd(result_reg, kScratchRegister); 4707 __ Cvtlsi2sd(result_reg, kScratchRegister);
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
5566 __ bind(deferred->exit()); 5567 __ bind(deferred->exit());
5567 __ bind(&done); 5568 __ bind(&done);
5568 } 5569 }
5569 5570
5570 #undef __ 5571 #undef __
5571 5572
5572 } // namespace internal 5573 } // namespace internal
5573 } // namespace v8 5574 } // namespace v8
5574 5575
5575 #endif // V8_TARGET_ARCH_X64 5576 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/compiler/x64/code-generator-x64.cc ('K') | « src/compiler/x64/code-generator-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698