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

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

Issue 2233273002: X87: [wasm] Use the Float64Max/Min machine operators to implement F64Max/Min. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Updated the CL according to ahaas's comment 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
« no previous file with comments | « src/compiler/x87/code-generator-x87.cc ('k') | no next file » | 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 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/crankshaft/x87/lithium-codegen-x87.h" 7 #include "src/crankshaft/x87/lithium-codegen-x87.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 4717 matching lines...) Expand 10 before | Expand all | Expand 10 after
4728 } else { 4728 } else {
4729 Label heap_number, convert; 4729 Label heap_number, convert;
4730 __ j(equal, &heap_number); 4730 __ j(equal, &heap_number);
4731 4731
4732 // Convert undefined (or hole) to NaN. 4732 // Convert undefined (or hole) to NaN.
4733 __ cmp(input_reg, factory()->undefined_value()); 4733 __ cmp(input_reg, factory()->undefined_value());
4734 DeoptimizeIf(not_equal, instr, 4734 DeoptimizeIf(not_equal, instr,
4735 DeoptimizeReason::kNotAHeapNumberUndefined); 4735 DeoptimizeReason::kNotAHeapNumberUndefined);
4736 4736
4737 __ bind(&convert); 4737 __ bind(&convert);
4738 __ push(Immediate(0xffffffff)); 4738 __ push(Immediate(0xfff80000));
ahaas 2016/08/11 08:06:11 In the old code the low word "0xffffffff" was push
4739 __ push(Immediate(0x7fffffff)); 4739 __ push(Immediate(0x00000000));
4740 __ fld_d(MemOperand(esp, 0)); 4740 __ fld_d(MemOperand(esp, 0));
4741 __ lea(esp, Operand(esp, kDoubleSize)); 4741 __ lea(esp, Operand(esp, kDoubleSize));
4742 __ jmp(&done, Label::kNear); 4742 __ jmp(&done, Label::kNear);
4743 4743
4744 __ bind(&heap_number); 4744 __ bind(&heap_number);
4745 } 4745 }
4746 // Heap number to x87 conversion. 4746 // Heap number to x87 conversion.
4747 __ fld_d(FieldOperand(input_reg, HeapNumber::kValueOffset)); 4747 __ fld_d(FieldOperand(input_reg, HeapNumber::kValueOffset));
4748 if (deoptimize_on_minus_zero) { 4748 if (deoptimize_on_minus_zero) {
4749 __ fldz(); 4749 __ fldz();
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
5771 __ bind(deferred->exit()); 5771 __ bind(deferred->exit());
5772 __ bind(&done); 5772 __ bind(&done);
5773 } 5773 }
5774 5774
5775 #undef __ 5775 #undef __
5776 5776
5777 } // namespace internal 5777 } // namespace internal
5778 } // namespace v8 5778 } // namespace v8
5779 5779
5780 #endif // V8_TARGET_ARCH_X87 5780 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/compiler/x87/code-generator-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698