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/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 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 namespace compiler { | 10 namespace compiler { |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 VisitBinop(selector, node, sub_opcode, false); | 392 VisitBinop(selector, node, sub_opcode, false); |
393 } | 393 } |
394 } | 394 } |
395 | 395 |
396 | 396 |
397 void InstructionSelector::VisitInt32Sub(Node* node) { | 397 void InstructionSelector::VisitInt32Sub(Node* node) { |
398 VisitSub<int32_t>(this, node, kX64Sub32, kX64Neg32); | 398 VisitSub<int32_t>(this, node, kX64Sub32, kX64Neg32); |
399 } | 399 } |
400 | 400 |
401 | 401 |
| 402 void InstructionSelector::VisitInt32SubWithOverflow(Node* node) { |
| 403 VisitBinopWithOverflow(this, node, kX64Sub32); |
| 404 } |
| 405 |
| 406 |
402 void InstructionSelector::VisitInt64Sub(Node* node) { | 407 void InstructionSelector::VisitInt64Sub(Node* node) { |
403 VisitSub<int64_t>(this, node, kX64Sub, kX64Neg); | 408 VisitSub<int64_t>(this, node, kX64Sub, kX64Neg); |
404 } | 409 } |
405 | 410 |
406 | 411 |
407 static void VisitMul(InstructionSelector* selector, Node* node, | 412 static void VisitMul(InstructionSelector* selector, Node* node, |
408 ArchOpcode opcode) { | 413 ArchOpcode opcode) { |
409 X64OperandGenerator g(selector); | 414 X64OperandGenerator g(selector); |
410 Node* left = node->InputAt(0); | 415 Node* left = node->InputAt(0); |
411 Node* right = node->InputAt(1); | 416 Node* right = node->InputAt(1); |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 ASSERT(deoptimization == NULL && continuation == NULL); | 730 ASSERT(deoptimization == NULL && continuation == NULL); |
726 Emit(kPopStack | MiscField::encode(buffer.pushed_count), NULL); | 731 Emit(kPopStack | MiscField::encode(buffer.pushed_count), NULL); |
727 } | 732 } |
728 } | 733 } |
729 | 734 |
730 #endif | 735 #endif |
731 | 736 |
732 } // namespace compiler | 737 } // namespace compiler |
733 } // namespace internal | 738 } // namespace internal |
734 } // namespace v8 | 739 } // namespace v8 |
OLD | NEW |