Chromium Code Reviews| Index: src/compiler/ia32/instruction-selector-ia32.cc |
| diff --git a/src/compiler/ia32/instruction-selector-ia32.cc b/src/compiler/ia32/instruction-selector-ia32.cc |
| index e1a9cb7f69be8ef97f37abfe70f32a7622211967..5e915a6252701570a732c500c7d002ab6c2b476c 100644 |
| --- a/src/compiler/ia32/instruction-selector-ia32.cc |
| +++ b/src/compiler/ia32/instruction-selector-ia32.cc |
| @@ -142,6 +142,14 @@ class AddressingModeMatcher { |
| }; |
| +static void VisitRRFloat64(InstructionSelector* selector, ArchOpcode opcode, |
| + Node* node) { |
| + IA32OperandGenerator g(selector); |
| + selector->Emit(opcode, g.DefineAsRegister(node), |
| + g.UseRegister(node->InputAt(0))); |
| +} |
| + |
| + |
| void InstructionSelector::VisitLoad(Node* node) { |
| MachineType rep = RepresentationOf(OpParameter<LoadRepresentation>(node)); |
| MachineType typ = TypeOf(OpParameter<LoadRepresentation>(node)); |
| @@ -596,6 +604,35 @@ void InstructionSelector::VisitFloat64Sqrt(Node* node) { |
| } |
| +void InstructionSelector::VisitFloat64Floor(Node* node) { |
| + if (!CpuFeatures::IsSupported(SSE4_1)) { |
|
Benedikt Meurer
2014/10/30 11:59:12
I think this should be DCHECK(CpuFeatures::IsSuppo
sigurds
2014/10/30 12:18:26
Done.
|
| + UNSUPPORTED_OPERATOR(node); |
| + } |
| + VisitRRFloat64(this, kSSEFloat64Floor, node); |
| +} |
| + |
| + |
| +void InstructionSelector::VisitFloat64Ceil(Node* node) { |
| + if (!CpuFeatures::IsSupported(SSE4_1)) { |
|
Benedikt Meurer
2014/10/30 11:59:13
I think this should be DCHECK(CpuFeatures::IsSuppo
sigurds
2014/10/30 12:18:26
Done.
|
| + UNSUPPORTED_OPERATOR(node); |
| + } |
| + VisitRRFloat64(this, kSSEFloat64Ceil, node); |
| +} |
| + |
| + |
| +void InstructionSelector::VisitFloat64RoundTruncate(Node* node) { |
| + if (!CpuFeatures::IsSupported(SSE4_1)) { |
|
Benedikt Meurer
2014/10/30 11:59:12
I think this should be DCHECK(CpuFeatures::IsSuppo
sigurds
2014/10/30 12:18:26
Done.
|
| + UNSUPPORTED_OPERATOR(node); |
| + } |
| + VisitRRFloat64(this, kSSEFloat64RoundTruncate, node); |
| +} |
| + |
| + |
| +void InstructionSelector::VisitFloat64RoundTiesAway(Node* node) { |
| + UNSUPPORTED_OPERATOR(node); |
| +} |
| + |
| + |
| void InstructionSelector::VisitCall(Node* node) { |
| IA32OperandGenerator g(this); |
| CallDescriptor* descriptor = OpParameter<CallDescriptor*>(node); |
| @@ -881,9 +918,13 @@ void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) { |
| // static |
| MachineOperatorBuilder::Flags |
| InstructionSelector::SupportedMachineOperatorFlags() { |
| - return MachineOperatorBuilder::kNoFlags; |
| + if (CpuFeatures::IsSupported(SSE4_1)) { |
| + return MachineOperatorBuilder::kFloat64Floor | |
| + MachineOperatorBuilder::kFloat64Ceil | |
| + MachineOperatorBuilder::kFloat64RoundTruncate; |
| + } |
| + return MachineOperatorBuilder::Flag::kNoFlags; |
| } |
| - |
| } // namespace compiler |
| } // namespace internal |
| } // namespace v8 |