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

Unified Diff: src/compiler/x64/instruction-selector-x64.cc

Issue 2170343002: [turbofan] Change Float64Max/Float64Min to JavaScript semantics. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mips/mips64 ports. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/x64/instruction-scheduler-x64.cc ('k') | test/cctest/compiler/test-run-machops.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/x64/instruction-selector-x64.cc
diff --git a/src/compiler/x64/instruction-selector-x64.cc b/src/compiler/x64/instruction-selector-x64.cc
index ef82119e82b26fb997293aee0e7d6002827f7286..c2101ca7a204ea84f390664a57fc73a4db83e5a7 100644
--- a/src/compiler/x64/instruction-selector-x64.cc
+++ b/src/compiler/x64/instruction-selector-x64.cc
@@ -1131,6 +1131,12 @@ void VisitRR(InstructionSelector* selector, Node* node,
g.UseRegister(node->InputAt(0)));
}
+void VisitRRO(InstructionSelector* selector, Node* node,
+ InstructionCode opcode) {
+ X64OperandGenerator g(selector);
+ selector->Emit(opcode, g.DefineSameAsFirst(node),
+ g.UseRegister(node->InputAt(0)), g.Use(node->InputAt(1)));
+}
void VisitFloatBinop(InstructionSelector* selector, Node* node,
ArchOpcode avx_opcode, ArchOpcode sse_opcode) {
@@ -1287,16 +1293,6 @@ void InstructionSelector::VisitFloat32Div(Node* node) {
}
-void InstructionSelector::VisitFloat32Max(Node* node) {
- VisitFloatBinop(this, node, kAVXFloat32Max, kSSEFloat32Max);
-}
-
-
-void InstructionSelector::VisitFloat32Min(Node* node) {
- VisitFloatBinop(this, node, kAVXFloat32Min, kSSEFloat32Min);
-}
-
-
void InstructionSelector::VisitFloat32Abs(Node* node) {
VisitFloatUnop(this, node, node->InputAt(0), kAVXFloat32Abs, kSSEFloat32Abs);
}
@@ -1359,12 +1355,12 @@ void InstructionSelector::VisitFloat64Mod(Node* node) {
void InstructionSelector::VisitFloat64Max(Node* node) {
- VisitFloatBinop(this, node, kAVXFloat64Max, kSSEFloat64Max);
+ VisitRRO(this, node, kSSEFloat64Max);
}
void InstructionSelector::VisitFloat64Min(Node* node) {
- VisitFloatBinop(this, node, kAVXFloat64Min, kSSEFloat64Min);
+ VisitRRO(this, node, kSSEFloat64Min);
}
@@ -2130,10 +2126,6 @@ void InstructionSelector::VisitAtomicStore(Node* node) {
MachineOperatorBuilder::Flags
InstructionSelector::SupportedMachineOperatorFlags() {
MachineOperatorBuilder::Flags flags =
- MachineOperatorBuilder::kFloat32Max |
- MachineOperatorBuilder::kFloat32Min |
- MachineOperatorBuilder::kFloat64Max |
- MachineOperatorBuilder::kFloat64Min |
MachineOperatorBuilder::kWord32ShiftIsSafe |
MachineOperatorBuilder::kWord32Ctz | MachineOperatorBuilder::kWord64Ctz;
if (CpuFeatures::IsSupported(POPCNT)) {
« no previous file with comments | « src/compiler/x64/instruction-scheduler-x64.cc ('k') | test/cctest/compiler/test-run-machops.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698