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

Side by Side Diff: src/compiler/mips64/instruction-selector-mips64.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
« no previous file with comments | « src/compiler/mips/instruction-selector-mips.cc ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 1152
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) {
1163 VisitRRR(this, kMips64SubS, node);
1164 }
1162 1165
1163 void InstructionSelector::VisitFloat64Sub(Node* node) { 1166 void InstructionSelector::VisitFloat64Sub(Node* node) {
1164 Mips64OperandGenerator g(this); 1167 Mips64OperandGenerator g(this);
1165 Float64BinopMatcher m(node); 1168 Float64BinopMatcher m(node);
1166 if (m.left().IsMinusZero() && m.right().IsFloat64RoundDown() && 1169 if (m.left().IsMinusZero() && m.right().IsFloat64RoundDown() &&
1167 CanCover(m.node(), m.right().node())) { 1170 CanCover(m.node(), m.right().node())) {
1168 if (m.right().InputAt(0)->opcode() == IrOpcode::kFloat64Sub && 1171 if (m.right().InputAt(0)->opcode() == IrOpcode::kFloat64Sub &&
1169 CanCover(m.right().node(), m.right().InputAt(0))) { 1172 CanCover(m.right().node(), m.right().InputAt(0))) {
1170 Float64BinopMatcher mright0(m.right().InputAt(0)); 1173 Float64BinopMatcher mright0(m.right().InputAt(0));
1171 if (mright0.left().IsMinusZero()) { 1174 if (mright0.left().IsMinusZero()) {
1172 Emit(kMips64Float64RoundUp, g.DefineAsRegister(node), 1175 Emit(kMips64Float64RoundUp, g.DefineAsRegister(node),
1173 g.UseRegister(mright0.right().node())); 1176 g.UseRegister(mright0.right().node()));
1174 return; 1177 return;
1175 } 1178 }
1176 } 1179 }
1177 } 1180 }
1178 VisitRRR(this, kMips64SubD, node); 1181 VisitRRR(this, kMips64SubD, node);
1179 } 1182 }
1180 1183
1184 void InstructionSelector::VisitFloat64SubPreserveNan(Node* node) {
1185 VisitRRR(this, kMips64SubD, node);
1186 }
1181 1187
1182 void InstructionSelector::VisitFloat32Mul(Node* node) { 1188 void InstructionSelector::VisitFloat32Mul(Node* node) {
1183 VisitRRR(this, kMips64MulS, node); 1189 VisitRRR(this, kMips64MulS, node);
1184 } 1190 }
1185 1191
1186 1192
1187 void InstructionSelector::VisitFloat64Mul(Node* node) { 1193 void InstructionSelector::VisitFloat64Mul(Node* node) {
1188 VisitRRR(this, kMips64MulD, node); 1194 VisitRRR(this, kMips64MulD, node);
1189 } 1195 }
1190 1196
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
2047 MachineOperatorBuilder::kFloat32RoundUp | 2053 MachineOperatorBuilder::kFloat32RoundUp |
2048 MachineOperatorBuilder::kFloat64RoundTruncate | 2054 MachineOperatorBuilder::kFloat64RoundTruncate |
2049 MachineOperatorBuilder::kFloat32RoundTruncate | 2055 MachineOperatorBuilder::kFloat32RoundTruncate |
2050 MachineOperatorBuilder::kFloat64RoundTiesEven | 2056 MachineOperatorBuilder::kFloat64RoundTiesEven |
2051 MachineOperatorBuilder::kFloat32RoundTiesEven; 2057 MachineOperatorBuilder::kFloat32RoundTiesEven;
2052 } 2058 }
2053 2059
2054 } // namespace compiler 2060 } // namespace compiler
2055 } // namespace internal 2061 } // namespace internal
2056 } // namespace v8 2062 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips/instruction-selector-mips.cc ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698