| OLD | NEW |
| 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/compiler/instruction-selector-impl.h" | 5 #include "src/compiler/instruction-selector-impl.h" |
| 6 #include "src/compiler/node-matchers.h" | 6 #include "src/compiler/node-matchers.h" |
| 7 #include "src/compiler/node-properties.h" | 7 #include "src/compiler/node-properties.h" |
| 8 | 8 |
| 9 namespace v8 { | 9 namespace v8 { |
| 10 namespace internal { | 10 namespace internal { |
| (...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1062 | 1062 |
| 1063 | 1063 |
| 1064 void InstructionSelector::VisitFloat64Add(Node* node) { | 1064 void InstructionSelector::VisitFloat64Add(Node* node) { |
| 1065 VisitRRRFloat64(this, kArm64Float64Add, node); | 1065 VisitRRRFloat64(this, kArm64Float64Add, node); |
| 1066 } | 1066 } |
| 1067 | 1067 |
| 1068 | 1068 |
| 1069 void InstructionSelector::VisitFloat64Sub(Node* node) { | 1069 void InstructionSelector::VisitFloat64Sub(Node* node) { |
| 1070 Arm64OperandGenerator g(this); | 1070 Arm64OperandGenerator g(this); |
| 1071 Float64BinopMatcher m(node); | 1071 Float64BinopMatcher m(node); |
| 1072 if (m.left().IsMinusZero() && m.right().IsFloat64RoundDown() && | 1072 if (m.left().IsMinusZero()) { |
| 1073 CanCover(m.node(), m.right().node())) { | 1073 if (m.right().IsFloat64RoundDown() && |
| 1074 if (m.right().InputAt(0)->opcode() == IrOpcode::kFloat64Sub && | 1074 CanCover(m.node(), m.right().node())) { |
| 1075 CanCover(m.right().node(), m.right().InputAt(0))) { | 1075 if (m.right().InputAt(0)->opcode() == IrOpcode::kFloat64Sub && |
| 1076 Float64BinopMatcher mright0(m.right().InputAt(0)); | 1076 CanCover(m.right().node(), m.right().InputAt(0))) { |
| 1077 if (mright0.left().IsMinusZero()) { | 1077 Float64BinopMatcher mright0(m.right().InputAt(0)); |
| 1078 Emit(kArm64Float64RoundUp, g.DefineAsRegister(node), | 1078 if (mright0.left().IsMinusZero()) { |
| 1079 g.UseRegister(mright0.right().node())); | 1079 Emit(kArm64Float64RoundUp, g.DefineAsRegister(node), |
| 1080 return; | 1080 g.UseRegister(mright0.right().node())); |
| 1081 return; |
| 1082 } |
| 1081 } | 1083 } |
| 1082 } | 1084 } |
| 1085 Emit(kArm64Float64Neg, g.DefineAsRegister(node), |
| 1086 g.UseRegister(m.right().node())); |
| 1087 return; |
| 1083 } | 1088 } |
| 1084 VisitRRRFloat64(this, kArm64Float64Sub, node); | 1089 VisitRRRFloat64(this, kArm64Float64Sub, node); |
| 1085 } | 1090 } |
| 1086 | 1091 |
| 1087 | 1092 |
| 1088 void InstructionSelector::VisitFloat64Mul(Node* node) { | 1093 void InstructionSelector::VisitFloat64Mul(Node* node) { |
| 1089 VisitRRRFloat64(this, kArm64Float64Mul, node); | 1094 VisitRRRFloat64(this, kArm64Float64Mul, node); |
| 1090 } | 1095 } |
| 1091 | 1096 |
| 1092 | 1097 |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1659 MachineOperatorBuilder::kFloat64Max | | 1664 MachineOperatorBuilder::kFloat64Max | |
| 1660 MachineOperatorBuilder::kFloat64Min | | 1665 MachineOperatorBuilder::kFloat64Min | |
| 1661 MachineOperatorBuilder::kWord32ShiftIsSafe | | 1666 MachineOperatorBuilder::kWord32ShiftIsSafe | |
| 1662 MachineOperatorBuilder::kInt32DivIsSafe | | 1667 MachineOperatorBuilder::kInt32DivIsSafe | |
| 1663 MachineOperatorBuilder::kUint32DivIsSafe; | 1668 MachineOperatorBuilder::kUint32DivIsSafe; |
| 1664 } | 1669 } |
| 1665 | 1670 |
| 1666 } // namespace compiler | 1671 } // namespace compiler |
| 1667 } // namespace internal | 1672 } // namespace internal |
| 1668 } // namespace v8 | 1673 } // namespace v8 |
| OLD | NEW |