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

Side by Side Diff: src/compiler/simplified-lowering.cc

Issue 974313002: [turbofan] Support for %_DoubleHi, %_DoubleLo and %_ConstructDouble. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed Svens comment. Created 5 years, 9 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/raw-machine-assembler.h ('k') | src/compiler/typer.cc » ('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/compiler/simplified-lowering.h" 5 #include "src/compiler/simplified-lowering.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 for (int j = node->op()->EffectInputCount(); j > 0; ++i, j--) { 266 for (int j = node->op()->EffectInputCount(); j > 0; ++i, j--) {
267 Enqueue((*i).to()); // Effect inputs: just visit 267 Enqueue((*i).to()); // Effect inputs: just visit
268 } 268 }
269 for (int j = node->op()->ControlInputCount(); j > 0; ++i, j--) { 269 for (int j = node->op()->ControlInputCount(); j > 0; ++i, j--) {
270 Enqueue((*i).to()); // Control inputs: just visit 270 Enqueue((*i).to()); // Control inputs: just visit
271 } 271 }
272 DCHECK(i == node->input_edges().end()); 272 DCHECK(i == node->input_edges().end());
273 SetOutput(node, kMachAnyTagged); 273 SetOutput(node, kMachAnyTagged);
274 } 274 }
275 275
276 // Helper for binops of the R x L -> O variety.
277 void VisitBinop(Node* node, MachineTypeUnion left_use,
278 MachineTypeUnion right_use, MachineTypeUnion output) {
279 DCHECK_EQ(2, node->InputCount());
280 ProcessInput(node, 0, left_use);
281 ProcessInput(node, 1, right_use);
282 SetOutput(node, output);
283 }
284
276 // Helper for binops of the I x I -> O variety. 285 // Helper for binops of the I x I -> O variety.
277 void VisitBinop(Node* node, MachineTypeUnion input_use, 286 void VisitBinop(Node* node, MachineTypeUnion input_use,
278 MachineTypeUnion output) { 287 MachineTypeUnion output) {
279 DCHECK_EQ(2, node->InputCount()); 288 VisitBinop(node, input_use, input_use, output);
280 ProcessInput(node, 0, input_use);
281 ProcessInput(node, 1, input_use);
282 SetOutput(node, output);
283 } 289 }
284 290
285 // Helper for unops of the I -> O variety. 291 // Helper for unops of the I -> O variety.
286 void VisitUnop(Node* node, MachineTypeUnion input_use, 292 void VisitUnop(Node* node, MachineTypeUnion input_use,
287 MachineTypeUnion output) { 293 MachineTypeUnion output) {
288 DCHECK_EQ(1, node->InputCount()); 294 DCHECK_EQ(1, node->InputCount());
289 ProcessInput(node, 0, input_use); 295 ProcessInput(node, 0, input_use);
290 SetOutput(node, output); 296 SetOutput(node, output);
291 } 297 }
292 298
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 case IrOpcode::kFloat64Sqrt: 1032 case IrOpcode::kFloat64Sqrt:
1027 case IrOpcode::kFloat64Floor: 1033 case IrOpcode::kFloat64Floor:
1028 case IrOpcode::kFloat64Ceil: 1034 case IrOpcode::kFloat64Ceil:
1029 case IrOpcode::kFloat64RoundTruncate: 1035 case IrOpcode::kFloat64RoundTruncate:
1030 case IrOpcode::kFloat64RoundTiesAway: 1036 case IrOpcode::kFloat64RoundTiesAway:
1031 return VisitUnop(node, kMachFloat64, kMachFloat64); 1037 return VisitUnop(node, kMachFloat64, kMachFloat64);
1032 case IrOpcode::kFloat64Equal: 1038 case IrOpcode::kFloat64Equal:
1033 case IrOpcode::kFloat64LessThan: 1039 case IrOpcode::kFloat64LessThan:
1034 case IrOpcode::kFloat64LessThanOrEqual: 1040 case IrOpcode::kFloat64LessThanOrEqual:
1035 return VisitFloat64Cmp(node); 1041 return VisitFloat64Cmp(node);
1042 case IrOpcode::kFloat64ExtractLowWord32:
1043 case IrOpcode::kFloat64ExtractHighWord32:
1044 return VisitUnop(node, kMachFloat64, kMachInt32);
1045 case IrOpcode::kFloat64InsertLowWord32:
1046 case IrOpcode::kFloat64InsertHighWord32:
1047 return VisitBinop(node, kMachFloat64, kMachInt32, kMachFloat64);
1036 case IrOpcode::kLoadStackPointer: 1048 case IrOpcode::kLoadStackPointer:
1037 return VisitLeaf(node, kMachPtr); 1049 return VisitLeaf(node, kMachPtr);
1038 case IrOpcode::kStateValues: 1050 case IrOpcode::kStateValues:
1039 for (int i = 0; i < node->InputCount(); i++) { 1051 for (int i = 0; i < node->InputCount(); i++) {
1040 ProcessInput(node, i, kTypeAny); 1052 ProcessInput(node, i, kTypeAny);
1041 } 1053 }
1042 SetOutput(node, kMachAnyTagged); 1054 SetOutput(node, kMachAnyTagged);
1043 break; 1055 break;
1044 default: 1056 default:
1045 VisitInputs(node); 1057 VisitInputs(node);
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
1592 1604
1593 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { 1605 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) {
1594 node->set_op(machine()->IntLessThanOrEqual()); 1606 node->set_op(machine()->IntLessThanOrEqual());
1595 node->ReplaceInput(0, StringComparison(node, true)); 1607 node->ReplaceInput(0, StringComparison(node, true));
1596 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); 1608 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL));
1597 } 1609 }
1598 1610
1599 } // namespace compiler 1611 } // namespace compiler
1600 } // namespace internal 1612 } // namespace internal
1601 } // namespace v8 1613 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/raw-machine-assembler.h ('k') | src/compiler/typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698