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

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

Issue 1804953002: [wasm] Int64Lowering of I64ReinterpretF64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Removed unused variables. Created 4 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 | « no previous file | src/compiler/wasm-compiler.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/int64-lowering.h" 5 #include "src/compiler/int64-lowering.h"
6 #include "src/compiler/common-operator.h" 6 #include "src/compiler/common-operator.h"
7 #include "src/compiler/graph.h" 7 #include "src/compiler/graph.h"
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 #include "src/compiler/machine-operator.h" 9 #include "src/compiler/machine-operator.h"
10 #include "src/compiler/node-properties.h" 10 #include "src/compiler/node-properties.h"
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 Node* input = node->InputAt(0); 437 Node* input = node->InputAt(0);
438 if (HasReplacementLow(input)) { 438 if (HasReplacementLow(input)) {
439 input = GetReplacementLow(input); 439 input = GetReplacementLow(input);
440 } 440 }
441 ReplaceNode(node, input, graph()->NewNode(common()->Int32Constant(0))); 441 ReplaceNode(node, input, graph()->NewNode(common()->Int32Constant(0)));
442 node->NullAllInputs(); 442 node->NullAllInputs();
443 break; 443 break;
444 } 444 }
445 // kExprF64ReinterpretI64: 445 // kExprF64ReinterpretI64:
446 // kExprI64ReinterpretF64: 446 // kExprI64ReinterpretF64:
447 case IrOpcode::kBitcastFloat64ToInt64: {
448 DCHECK(node->InputCount() == 1);
449 Node* input = node->InputAt(0);
450 Node* stack_slot = graph()->NewNode(
451 machine()->StackSlot(MachineRepresentation::kWord64));
452 Node* store = graph()->NewNode(
453 machine()->Store(
454 StoreRepresentation(MachineRepresentation::kFloat64,
455 WriteBarrierKind::kNoWriteBarrier)),
456 stack_slot, graph()->NewNode(common()->Int32Constant(0)), input,
457 graph()->start(), graph()->start());
447 458
459 Node* high_node =
460 graph()->NewNode(machine()->Load(MachineType::Int32()), stack_slot,
461 graph()->NewNode(common()->Int32Constant(4)), store,
462 graph()->start());
463
464 Node* low_node =
465 graph()->NewNode(machine()->Load(MachineType::Int32()), stack_slot,
466 graph()->NewNode(common()->Int32Constant(0)), store,
467 graph()->start());
468 ReplaceNode(node, low_node, high_node);
469 break;
470 }
448 // kExprI64Clz: 471 // kExprI64Clz:
449 // kExprI64Ctz: 472 // kExprI64Ctz:
450 case IrOpcode::kWord64Popcnt: { 473 case IrOpcode::kWord64Popcnt: {
451 DCHECK(node->InputCount() == 1); 474 DCHECK(node->InputCount() == 1);
452 Node* input = node->InputAt(0); 475 Node* input = node->InputAt(0);
453 // We assume that a Word64Popcnt node only has been created if 476 // We assume that a Word64Popcnt node only has been created if
454 // Word32Popcnt is actually supported. 477 // Word32Popcnt is actually supported.
455 DCHECK(machine()->Word32Popcnt().IsSupported()); 478 DCHECK(machine()->Word32Popcnt().IsSupported());
456 ReplaceNode(node, graph()->NewNode( 479 ReplaceNode(node, graph()->NewNode(
457 machine()->Int32Add(), 480 machine()->Int32Add(),
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 } 548 }
526 549
527 Node* Int64Lowering::GetReplacementHigh(Node* node) { 550 Node* Int64Lowering::GetReplacementHigh(Node* node) {
528 Node* result = replacements_[node->id()].high; 551 Node* result = replacements_[node->id()].high;
529 DCHECK(result); 552 DCHECK(result);
530 return result; 553 return result;
531 } 554 }
532 } // namespace compiler 555 } // namespace compiler
533 } // namespace internal 556 } // namespace internal
534 } // namespace v8 557 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/wasm-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698