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 89e622d8b5702a3bc9cd79c289c5633f731fa7a4..f8a49c4968f97975ba1cc0b38bae2db3ffb69b10 100644 |
--- a/src/compiler/x64/instruction-selector-x64.cc |
+++ b/src/compiler/x64/instruction-selector-x64.cc |
@@ -1226,44 +1226,32 @@ |
void InstructionSelector::VisitFloat32RoundDown(Node* node) { |
- X64OperandGenerator g(this); |
- Emit(kSSEFloat32Round | MiscField::encode(kRoundDown), |
- g.DefineSameAsFirst(node), g.UseRegister(node->InputAt(0))); |
+ VisitRR(this, node, kSSEFloat32Round | MiscField::encode(kRoundDown)); |
} |
void InstructionSelector::VisitFloat64RoundDown(Node* node) { |
- X64OperandGenerator g(this); |
- Emit(kSSEFloat64Round | MiscField::encode(kRoundDown), |
- g.DefineSameAsFirst(node), g.UseRegister(node->InputAt(0))); |
+ VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundDown)); |
} |
void InstructionSelector::VisitFloat32RoundUp(Node* node) { |
- X64OperandGenerator g(this); |
- Emit(kSSEFloat32Round | MiscField::encode(kRoundUp), |
- g.DefineSameAsFirst(node), g.UseRegister(node->InputAt(0))); |
+ VisitRR(this, node, kSSEFloat32Round | MiscField::encode(kRoundUp)); |
} |
void InstructionSelector::VisitFloat64RoundUp(Node* node) { |
- X64OperandGenerator g(this); |
- Emit(kSSEFloat64Round | MiscField::encode(kRoundUp), |
- g.DefineSameAsFirst(node), g.UseRegister(node->InputAt(0))); |
+ VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundUp)); |
} |
void InstructionSelector::VisitFloat32RoundTruncate(Node* node) { |
- X64OperandGenerator g(this); |
- Emit(kSSEFloat32Round | MiscField::encode(kRoundToZero), |
- g.DefineSameAsFirst(node), g.UseRegister(node->InputAt(0))); |
+ VisitRR(this, node, kSSEFloat32Round | MiscField::encode(kRoundToZero)); |
} |
void InstructionSelector::VisitFloat64RoundTruncate(Node* node) { |
- X64OperandGenerator g(this); |
- Emit(kSSEFloat64Round | MiscField::encode(kRoundToZero), |
- g.DefineSameAsFirst(node), g.UseRegister(node->InputAt(0))); |
+ VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundToZero)); |
} |
@@ -1273,16 +1261,12 @@ |
void InstructionSelector::VisitFloat32RoundTiesEven(Node* node) { |
- X64OperandGenerator g(this); |
- Emit(kSSEFloat32Round | MiscField::encode(kRoundToNearest), |
- g.DefineSameAsFirst(node), g.UseRegister(node->InputAt(0))); |
+ VisitRR(this, node, kSSEFloat32Round | MiscField::encode(kRoundToNearest)); |
} |
void InstructionSelector::VisitFloat64RoundTiesEven(Node* node) { |
- X64OperandGenerator g(this); |
- Emit(kSSEFloat64Round | MiscField::encode(kRoundToNearest), |
- g.DefineSameAsFirst(node), g.UseRegister(node->InputAt(0))); |
+ VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundToNearest)); |
} |
@@ -1815,19 +1799,21 @@ |
MachineOperatorBuilder::kFloat64Max | |
MachineOperatorBuilder::kFloat64Min | |
MachineOperatorBuilder::kWord32ShiftIsSafe | |
- MachineOperatorBuilder::kWord32Ctz | MachineOperatorBuilder::kWord64Ctz | |
- MachineOperatorBuilder::kFloat32RoundDown | |
- MachineOperatorBuilder::kFloat32RoundUp | |
- MachineOperatorBuilder::kFloat32RoundTruncate | |
- MachineOperatorBuilder::kFloat32RoundTiesEven | |
- MachineOperatorBuilder::kFloat64RoundDown | |
- MachineOperatorBuilder::kFloat64RoundUp | |
- MachineOperatorBuilder::kFloat64RoundTruncate | |
- MachineOperatorBuilder::kFloat64RoundTiesEven; |
+ MachineOperatorBuilder::kWord32Ctz | MachineOperatorBuilder::kWord64Ctz; |
if (CpuFeatures::IsSupported(POPCNT)) { |
flags |= MachineOperatorBuilder::kWord32Popcnt | |
MachineOperatorBuilder::kWord64Popcnt; |
} |
+ if (CpuFeatures::IsSupported(SSE4_1)) { |
+ flags |= MachineOperatorBuilder::kFloat32RoundDown | |
+ MachineOperatorBuilder::kFloat64RoundDown | |
+ MachineOperatorBuilder::kFloat32RoundUp | |
+ MachineOperatorBuilder::kFloat64RoundUp | |
+ MachineOperatorBuilder::kFloat32RoundTruncate | |
+ MachineOperatorBuilder::kFloat64RoundTruncate | |
+ MachineOperatorBuilder::kFloat32RoundTiesEven | |
+ MachineOperatorBuilder::kFloat64RoundTiesEven; |
+ } |
return flags; |
} |