Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/compiler/arm64/instruction-selector-arm64.cc

Issue 1973493003: [turbofan] Introduce new operators Float32SubPreserveNan and Float64SubPreserveNan for wasm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after
1513 1513
1514 void InstructionSelector::VisitFloat64Add(Node* node) { 1514 void InstructionSelector::VisitFloat64Add(Node* node) {
1515 VisitRRR(this, kArm64Float64Add, node); 1515 VisitRRR(this, kArm64Float64Add, node);
1516 } 1516 }
1517 1517
1518 1518
1519 void InstructionSelector::VisitFloat32Sub(Node* node) { 1519 void InstructionSelector::VisitFloat32Sub(Node* node) {
1520 VisitRRR(this, kArm64Float32Sub, node); 1520 VisitRRR(this, kArm64Float32Sub, node);
1521 } 1521 }
1522 1522
1523 void InstructionSelector::VisitFloat32SubPreserveNan(Node* node) {
1524 VisitRRR(this, kArm64Float32Sub, node);
1525 }
1523 1526
1524 void InstructionSelector::VisitFloat64Sub(Node* node) { 1527 void InstructionSelector::VisitFloat64Sub(Node* node) {
1525 Arm64OperandGenerator g(this); 1528 Arm64OperandGenerator g(this);
1526 Float64BinopMatcher m(node); 1529 Float64BinopMatcher m(node);
1527 if (m.left().IsMinusZero()) { 1530 if (m.left().IsMinusZero()) {
1528 if (m.right().IsFloat64RoundDown() && 1531 if (m.right().IsFloat64RoundDown() &&
1529 CanCover(m.node(), m.right().node())) { 1532 CanCover(m.node(), m.right().node())) {
1530 if (m.right().InputAt(0)->opcode() == IrOpcode::kFloat64Sub && 1533 if (m.right().InputAt(0)->opcode() == IrOpcode::kFloat64Sub &&
1531 CanCover(m.right().node(), m.right().InputAt(0))) { 1534 CanCover(m.right().node(), m.right().InputAt(0))) {
1532 Float64BinopMatcher mright0(m.right().InputAt(0)); 1535 Float64BinopMatcher mright0(m.right().InputAt(0));
1533 if (mright0.left().IsMinusZero()) { 1536 if (mright0.left().IsMinusZero()) {
1534 Emit(kArm64Float64RoundUp, g.DefineAsRegister(node), 1537 Emit(kArm64Float64RoundUp, g.DefineAsRegister(node),
1535 g.UseRegister(mright0.right().node())); 1538 g.UseRegister(mright0.right().node()));
1536 return; 1539 return;
1537 } 1540 }
1538 } 1541 }
1539 } 1542 }
1540 Emit(kArm64Float64Neg, g.DefineAsRegister(node), 1543 Emit(kArm64Float64Neg, g.DefineAsRegister(node),
1541 g.UseRegister(m.right().node())); 1544 g.UseRegister(m.right().node()));
1542 return; 1545 return;
1543 } 1546 }
1544 VisitRRR(this, kArm64Float64Sub, node); 1547 VisitRRR(this, kArm64Float64Sub, node);
1545 } 1548 }
1546 1549
1550 void InstructionSelector::VisitFloat64SubPreserveNan(Node* node) {
1551 VisitRRR(this, kArm64Float64Sub, node);
1552 }
1547 1553
1548 void InstructionSelector::VisitFloat32Mul(Node* node) { 1554 void InstructionSelector::VisitFloat32Mul(Node* node) {
1549 VisitRRR(this, kArm64Float32Mul, node); 1555 VisitRRR(this, kArm64Float32Mul, node);
1550 } 1556 }
1551 1557
1552 1558
1553 void InstructionSelector::VisitFloat64Mul(Node* node) { 1559 void InstructionSelector::VisitFloat64Mul(Node* node) {
1554 VisitRRR(this, kArm64Float64Mul, node); 1560 VisitRRR(this, kArm64Float64Mul, node);
1555 } 1561 }
1556 1562
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after
2350 MachineOperatorBuilder::kWord32ShiftIsSafe | 2356 MachineOperatorBuilder::kWord32ShiftIsSafe |
2351 MachineOperatorBuilder::kInt32DivIsSafe | 2357 MachineOperatorBuilder::kInt32DivIsSafe |
2352 MachineOperatorBuilder::kUint32DivIsSafe | 2358 MachineOperatorBuilder::kUint32DivIsSafe |
2353 MachineOperatorBuilder::kWord32ReverseBits | 2359 MachineOperatorBuilder::kWord32ReverseBits |
2354 MachineOperatorBuilder::kWord64ReverseBits; 2360 MachineOperatorBuilder::kWord64ReverseBits;
2355 } 2361 }
2356 2362
2357 } // namespace compiler 2363 } // namespace compiler
2358 } // namespace internal 2364 } // namespace internal
2359 } // namespace v8 2365 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/instruction-selector-arm.cc ('k') | src/compiler/ia32/instruction-selector-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698