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

Side by Side Diff: src/compiler/ia32/instruction-selector-ia32.cc

Issue 2252863003: [turbofan] Add Float32(Max|Min) machine operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Type is number now. Created 4 years, 3 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/ia32/instruction-scheduler-ia32.cc ('k') | src/compiler/instruction-selector.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/base/adapters.h" 5 #include "src/base/adapters.h"
6 #include "src/compiler/instruction-selector-impl.h" 6 #include "src/compiler/instruction-selector-impl.h"
7 #include "src/compiler/node-matchers.h" 7 #include "src/compiler/node-matchers.h"
8 #include "src/compiler/node-properties.h" 8 #include "src/compiler/node-properties.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 965
966 966
967 void InstructionSelector::VisitFloat64Mod(Node* node) { 967 void InstructionSelector::VisitFloat64Mod(Node* node) {
968 IA32OperandGenerator g(this); 968 IA32OperandGenerator g(this);
969 InstructionOperand temps[] = {g.TempRegister(eax)}; 969 InstructionOperand temps[] = {g.TempRegister(eax)};
970 Emit(kSSEFloat64Mod, g.DefineSameAsFirst(node), 970 Emit(kSSEFloat64Mod, g.DefineSameAsFirst(node),
971 g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1)), 1, 971 g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1)), 1,
972 temps); 972 temps);
973 } 973 }
974 974
975 void InstructionSelector::VisitFloat32Max(Node* node) {
976 IA32OperandGenerator g(this);
977 InstructionOperand temps[] = {g.TempRegister()};
978 Emit(kSSEFloat32Max, g.DefineSameAsFirst(node),
979 g.UseRegister(node->InputAt(0)), g.Use(node->InputAt(1)),
980 arraysize(temps), temps);
981 }
975 982
976 void InstructionSelector::VisitFloat64Max(Node* node) { 983 void InstructionSelector::VisitFloat64Max(Node* node) {
977 IA32OperandGenerator g(this); 984 IA32OperandGenerator g(this);
978 InstructionOperand temps[] = {g.TempRegister()}; 985 InstructionOperand temps[] = {g.TempRegister()};
979 Emit(kSSEFloat64Max, g.DefineSameAsFirst(node), 986 Emit(kSSEFloat64Max, g.DefineSameAsFirst(node),
980 g.UseRegister(node->InputAt(0)), g.Use(node->InputAt(1)), 987 g.UseRegister(node->InputAt(0)), g.Use(node->InputAt(1)),
981 arraysize(temps), temps); 988 arraysize(temps), temps);
982 } 989 }
983 990
991 void InstructionSelector::VisitFloat32Min(Node* node) {
992 IA32OperandGenerator g(this);
993 InstructionOperand temps[] = {g.TempRegister()};
994 Emit(kSSEFloat32Min, g.DefineSameAsFirst(node),
995 g.UseRegister(node->InputAt(0)), g.Use(node->InputAt(1)),
996 arraysize(temps), temps);
997 }
984 998
985 void InstructionSelector::VisitFloat64Min(Node* node) { 999 void InstructionSelector::VisitFloat64Min(Node* node) {
986 IA32OperandGenerator g(this); 1000 IA32OperandGenerator g(this);
987 InstructionOperand temps[] = {g.TempRegister()}; 1001 InstructionOperand temps[] = {g.TempRegister()};
988 Emit(kSSEFloat64Min, g.DefineSameAsFirst(node), 1002 Emit(kSSEFloat64Min, g.DefineSameAsFirst(node),
989 g.UseRegister(node->InputAt(0)), g.Use(node->InputAt(1)), 1003 g.UseRegister(node->InputAt(0)), g.Use(node->InputAt(1)),
990 arraysize(temps), temps); 1004 arraysize(temps), temps);
991 } 1005 }
992 1006
993 1007
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
1699 // static 1713 // static
1700 MachineOperatorBuilder::AlignmentRequirements 1714 MachineOperatorBuilder::AlignmentRequirements
1701 InstructionSelector::AlignmentRequirements() { 1715 InstructionSelector::AlignmentRequirements() {
1702 return MachineOperatorBuilder::AlignmentRequirements:: 1716 return MachineOperatorBuilder::AlignmentRequirements::
1703 FullUnalignedAccessSupport(); 1717 FullUnalignedAccessSupport();
1704 } 1718 }
1705 1719
1706 } // namespace compiler 1720 } // namespace compiler
1707 } // namespace internal 1721 } // namespace internal
1708 } // namespace v8 1722 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ia32/instruction-scheduler-ia32.cc ('k') | src/compiler/instruction-selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698