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/base/adapters.h" | 5 #include "src/base/adapters.h" |
6 #include "src/base/bits.h" | 6 #include "src/base/bits.h" |
7 #include "src/compiler/instruction-selector-impl.h" | 7 #include "src/compiler/instruction-selector-impl.h" |
8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
10 | 10 |
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1153 void InstructionSelector::VisitFloat64Add(Node* node) { | 1153 void InstructionSelector::VisitFloat64Add(Node* node) { |
1154 VisitRRR(this, kMips64AddD, node); | 1154 VisitRRR(this, kMips64AddD, node); |
1155 } | 1155 } |
1156 | 1156 |
1157 | 1157 |
1158 void InstructionSelector::VisitFloat32Sub(Node* node) { | 1158 void InstructionSelector::VisitFloat32Sub(Node* node) { |
1159 VisitRRR(this, kMips64SubS, node); | 1159 VisitRRR(this, kMips64SubS, node); |
1160 } | 1160 } |
1161 | 1161 |
1162 void InstructionSelector::VisitFloat32SubPreserveNan(Node* node) { | 1162 void InstructionSelector::VisitFloat32SubPreserveNan(Node* node) { |
1163 VisitRRR(this, kMips64SubS, node); | 1163 VisitRRR(this, kMips64SubPreserveNanS, node); |
1164 } | 1164 } |
1165 | 1165 |
1166 void InstructionSelector::VisitFloat64Sub(Node* node) { | 1166 void InstructionSelector::VisitFloat64Sub(Node* node) { |
1167 Mips64OperandGenerator g(this); | 1167 Mips64OperandGenerator g(this); |
1168 Float64BinopMatcher m(node); | 1168 Float64BinopMatcher m(node); |
1169 if (m.left().IsMinusZero() && m.right().IsFloat64RoundDown() && | 1169 if (m.left().IsMinusZero() && m.right().IsFloat64RoundDown() && |
1170 CanCover(m.node(), m.right().node())) { | 1170 CanCover(m.node(), m.right().node())) { |
1171 if (m.right().InputAt(0)->opcode() == IrOpcode::kFloat64Sub && | 1171 if (m.right().InputAt(0)->opcode() == IrOpcode::kFloat64Sub && |
1172 CanCover(m.right().node(), m.right().InputAt(0))) { | 1172 CanCover(m.right().node(), m.right().InputAt(0))) { |
1173 Float64BinopMatcher mright0(m.right().InputAt(0)); | 1173 Float64BinopMatcher mright0(m.right().InputAt(0)); |
1174 if (mright0.left().IsMinusZero()) { | 1174 if (mright0.left().IsMinusZero()) { |
1175 Emit(kMips64Float64RoundUp, g.DefineAsRegister(node), | 1175 Emit(kMips64Float64RoundUp, g.DefineAsRegister(node), |
1176 g.UseRegister(mright0.right().node())); | 1176 g.UseRegister(mright0.right().node())); |
1177 return; | 1177 return; |
1178 } | 1178 } |
1179 } | 1179 } |
1180 } | 1180 } |
1181 VisitRRR(this, kMips64SubD, node); | 1181 VisitRRR(this, kMips64SubD, node); |
1182 } | 1182 } |
1183 | 1183 |
1184 void InstructionSelector::VisitFloat64SubPreserveNan(Node* node) { | 1184 void InstructionSelector::VisitFloat64SubPreserveNan(Node* node) { |
1185 VisitRRR(this, kMips64SubD, node); | 1185 VisitRRR(this, kMips64SubPreserveNanD, node); |
1186 } | 1186 } |
1187 | 1187 |
1188 void InstructionSelector::VisitFloat32Mul(Node* node) { | 1188 void InstructionSelector::VisitFloat32Mul(Node* node) { |
1189 VisitRRR(this, kMips64MulS, node); | 1189 VisitRRR(this, kMips64MulS, node); |
1190 } | 1190 } |
1191 | 1191 |
1192 | 1192 |
1193 void InstructionSelector::VisitFloat64Mul(Node* node) { | 1193 void InstructionSelector::VisitFloat64Mul(Node* node) { |
1194 VisitRRR(this, kMips64MulD, node); | 1194 VisitRRR(this, kMips64MulD, node); |
1195 } | 1195 } |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2086 } else { | 2086 } else { |
2087 DCHECK(kArchVariant == kMips64r2); | 2087 DCHECK(kArchVariant == kMips64r2); |
2088 return MachineOperatorBuilder::AlignmentRequirements:: | 2088 return MachineOperatorBuilder::AlignmentRequirements:: |
2089 NoUnalignedAccessSupport(); | 2089 NoUnalignedAccessSupport(); |
2090 } | 2090 } |
2091 } | 2091 } |
2092 | 2092 |
2093 } // namespace compiler | 2093 } // namespace compiler |
2094 } // namespace internal | 2094 } // namespace internal |
2095 } // namespace v8 | 2095 } // namespace v8 |
OLD | NEW |