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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 VisitBinop(this, node, kMips64Or); | 340 VisitBinop(this, node, kMips64Or); |
341 } | 341 } |
342 | 342 |
343 | 343 |
344 void InstructionSelector::VisitWord64Or(Node* node) { | 344 void InstructionSelector::VisitWord64Or(Node* node) { |
345 VisitBinop(this, node, kMips64Or); | 345 VisitBinop(this, node, kMips64Or); |
346 } | 346 } |
347 | 347 |
348 | 348 |
349 void InstructionSelector::VisitWord32Xor(Node* node) { | 349 void InstructionSelector::VisitWord32Xor(Node* node) { |
| 350 Int32BinopMatcher m(node); |
| 351 if (m.left().IsWord32Or() && CanCover(node, m.left().node()) && |
| 352 m.right().Is(-1)) { |
| 353 Int32BinopMatcher mleft(m.left().node()); |
| 354 if (!mleft.right().HasValue()) { |
| 355 Mips64OperandGenerator g(this); |
| 356 Emit(kMips64Nor, g.DefineAsRegister(node), |
| 357 g.UseRegister(mleft.left().node()), |
| 358 g.UseRegister(mleft.right().node())); |
| 359 return; |
| 360 } |
| 361 } |
350 VisitBinop(this, node, kMips64Xor); | 362 VisitBinop(this, node, kMips64Xor); |
351 } | 363 } |
352 | 364 |
353 | 365 |
354 void InstructionSelector::VisitWord64Xor(Node* node) { | 366 void InstructionSelector::VisitWord64Xor(Node* node) { |
| 367 Int64BinopMatcher m(node); |
| 368 if (m.left().IsWord64Or() && CanCover(node, m.left().node()) && |
| 369 m.right().Is(-1)) { |
| 370 Int64BinopMatcher mleft(m.left().node()); |
| 371 if (!mleft.right().HasValue()) { |
| 372 Mips64OperandGenerator g(this); |
| 373 Emit(kMips64Nor, g.DefineAsRegister(node), |
| 374 g.UseRegister(mleft.left().node()), |
| 375 g.UseRegister(mleft.right().node())); |
| 376 return; |
| 377 } |
| 378 } |
355 VisitBinop(this, node, kMips64Xor); | 379 VisitBinop(this, node, kMips64Xor); |
356 } | 380 } |
357 | 381 |
358 | 382 |
359 void InstructionSelector::VisitWord32Shl(Node* node) { | 383 void InstructionSelector::VisitWord32Shl(Node* node) { |
360 VisitRRO(this, kMips64Shl, node); | 384 VisitRRO(this, kMips64Shl, node); |
361 } | 385 } |
362 | 386 |
363 | 387 |
364 void InstructionSelector::VisitWord32Shr(Node* node) { | 388 void InstructionSelector::VisitWord32Shr(Node* node) { |
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1553 MachineOperatorBuilder::kFloat32Max | | 1577 MachineOperatorBuilder::kFloat32Max | |
1554 MachineOperatorBuilder::kFloat64RoundDown | | 1578 MachineOperatorBuilder::kFloat64RoundDown | |
1555 MachineOperatorBuilder::kFloat64RoundUp | | 1579 MachineOperatorBuilder::kFloat64RoundUp | |
1556 MachineOperatorBuilder::kFloat64RoundTruncate | | 1580 MachineOperatorBuilder::kFloat64RoundTruncate | |
1557 MachineOperatorBuilder::kFloat64RoundTiesEven; | 1581 MachineOperatorBuilder::kFloat64RoundTiesEven; |
1558 } | 1582 } |
1559 | 1583 |
1560 } // namespace compiler | 1584 } // namespace compiler |
1561 } // namespace internal | 1585 } // namespace internal |
1562 } // namespace v8 | 1586 } // namespace v8 |
OLD | NEW |