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

Side by Side Diff: src/code-stub-assembler.cc

Issue 2473923003: [turbofan][x64] Improve code generation for Float64LessThan with Float64Abs. (Closed)
Patch Set: Fix for realz. Created 4 years, 1 month 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 | « no previous file | src/compiler/effect-control-linearizer.cc » ('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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 #include "src/code-stub-assembler.h" 4 #include "src/code-stub-assembler.h"
5 #include "src/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/frames-inl.h" 6 #include "src/frames-inl.h"
7 #include "src/frames.h" 7 #include "src/frames.h"
8 #include "src/ic/handler-configuration.h" 8 #include "src/ic/handler-configuration.h"
9 #include "src/ic/stub-cache.h" 9 #include "src/ic/stub-cache.h"
10 10
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 BranchIfSmiEqual(value_length, SmiConstant(0), if_false, if_true); 872 BranchIfSmiEqual(value_length, SmiConstant(0), if_false, if_true);
873 } 873 }
874 874
875 Bind(&if_valueisheapnumber); 875 Bind(&if_valueisheapnumber);
876 { 876 {
877 // Load the floating point value of {value}. 877 // Load the floating point value of {value}.
878 Node* value_value = LoadObjectField(value, HeapNumber::kValueOffset, 878 Node* value_value = LoadObjectField(value, HeapNumber::kValueOffset,
879 MachineType::Float64()); 879 MachineType::Float64());
880 880
881 // Check if the floating point {value} is neither 0.0, -0.0 nor NaN. 881 // Check if the floating point {value} is neither 0.0, -0.0 nor NaN.
882 Node* zero = Float64Constant(0.0); 882 Branch(Float64LessThan(Float64Constant(0.0), Float64Abs(value_value)),
883 GotoIf(Float64LessThan(zero, value_value), if_true); 883 if_true, if_false);
884 Branch(Float64LessThan(value_value, zero), if_true, if_false);
885 } 884 }
886 885
887 Bind(&if_valueisother); 886 Bind(&if_valueisother);
888 { 887 {
889 // Load the bit field from the {value}s map. The {value} is now either 888 // Load the bit field from the {value}s map. The {value} is now either
890 // Null or Undefined, which have the undetectable bit set (so we always 889 // Null or Undefined, which have the undetectable bit set (so we always
891 // return false for those), or a Symbol or Simd128Value, whose maps never 890 // return false for those), or a Symbol or Simd128Value, whose maps never
892 // have the undetectable bit set (so we always return true for those), or 891 // have the undetectable bit set (so we always return true for those), or
893 // a JSReceiver, which may or may not have the undetectable bit set. 892 // a JSReceiver, which may or may not have the undetectable bit set.
894 Node* value_map_bitfield = LoadMapBitField(value_map); 893 Node* value_map_bitfield = LoadMapBitField(value_map);
(...skipping 7927 matching lines...) Expand 10 before | Expand all | Expand 10 after
8822 } 8821 }
8823 8822
8824 void CodeStubArguments::PopAndReturn(compiler::Node* value) { 8823 void CodeStubArguments::PopAndReturn(compiler::Node* value) {
8825 assembler_->PopAndReturn( 8824 assembler_->PopAndReturn(
8826 assembler_->IntPtrAddFoldConstants(argc_, assembler_->IntPtrConstant(1)), 8825 assembler_->IntPtrAddFoldConstants(argc_, assembler_->IntPtrConstant(1)),
8827 value); 8826 value);
8828 } 8827 }
8829 8828
8830 } // namespace internal 8829 } // namespace internal
8831 } // namespace v8 8830 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/effect-control-linearizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698