| 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 #include "src/compiler/node-properties-inl.h" | 7 #include "src/compiler/node-properties-inl.h" |
| 8 | 8 |
| 9 namespace v8 { | 9 namespace v8 { |
| 10 namespace internal { | 10 namespace internal { |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 void InstructionSelector::VisitInt32Mod(Node* node) { | 356 void InstructionSelector::VisitInt32Mod(Node* node) { |
| 357 VisitMod(this, node, kIA32Idiv); | 357 VisitMod(this, node, kIA32Idiv); |
| 358 } | 358 } |
| 359 | 359 |
| 360 | 360 |
| 361 void InstructionSelector::VisitInt32UMod(Node* node) { | 361 void InstructionSelector::VisitInt32UMod(Node* node) { |
| 362 VisitMod(this, node, kIA32Udiv); | 362 VisitMod(this, node, kIA32Udiv); |
| 363 } | 363 } |
| 364 | 364 |
| 365 | 365 |
| 366 void InstructionSelector::VisitConvertInt32ToFloat64(Node* node) { | 366 void InstructionSelector::VisitChangeInt32ToFloat64(Node* node) { |
| 367 IA32OperandGenerator g(this); | 367 IA32OperandGenerator g(this); |
| 368 Emit(kSSEInt32ToFloat64, g.DefineAsDoubleRegister(node), | 368 Emit(kSSEInt32ToFloat64, g.DefineAsDoubleRegister(node), |
| 369 g.Use(node->InputAt(0))); | 369 g.Use(node->InputAt(0))); |
| 370 } | 370 } |
| 371 | 371 |
| 372 | 372 |
| 373 void InstructionSelector::VisitConvertUint32ToFloat64(Node* node) { | 373 void InstructionSelector::VisitChangeUint32ToFloat64(Node* node) { |
| 374 IA32OperandGenerator g(this); | 374 IA32OperandGenerator g(this); |
| 375 // TODO(turbofan): IA32 SSE LoadUint32() should take an operand. | 375 // TODO(turbofan): IA32 SSE LoadUint32() should take an operand. |
| 376 Emit(kSSEUint32ToFloat64, g.DefineAsDoubleRegister(node), | 376 Emit(kSSEUint32ToFloat64, g.DefineAsDoubleRegister(node), |
| 377 g.UseRegister(node->InputAt(0))); | 377 g.UseRegister(node->InputAt(0))); |
| 378 } | 378 } |
| 379 | 379 |
| 380 | 380 |
| 381 void InstructionSelector::VisitConvertFloat64ToInt32(Node* node) { | 381 void InstructionSelector::VisitChangeFloat64ToInt32(Node* node) { |
| 382 IA32OperandGenerator g(this); | 382 IA32OperandGenerator g(this); |
| 383 Emit(kSSEFloat64ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); | 383 Emit(kSSEFloat64ToInt32, g.DefineAsRegister(node), g.Use(node->InputAt(0))); |
| 384 } | 384 } |
| 385 | 385 |
| 386 | 386 |
| 387 void InstructionSelector::VisitConvertFloat64ToUint32(Node* node) { | 387 void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) { |
| 388 IA32OperandGenerator g(this); | 388 IA32OperandGenerator g(this); |
| 389 // TODO(turbofan): IA32 SSE subsd() should take an operand. | 389 // TODO(turbofan): IA32 SSE subsd() should take an operand. |
| 390 Emit(kSSEFloat64ToUint32, g.DefineAsRegister(node), | 390 Emit(kSSEFloat64ToUint32, g.DefineAsRegister(node), |
| 391 g.UseDoubleRegister(node->InputAt(0))); | 391 g.UseDoubleRegister(node->InputAt(0))); |
| 392 } | 392 } |
| 393 | 393 |
| 394 | 394 |
| 395 void InstructionSelector::VisitFloat64Add(Node* node) { | 395 void InstructionSelector::VisitFloat64Add(Node* node) { |
| 396 IA32OperandGenerator g(this); | 396 IA32OperandGenerator g(this); |
| 397 Emit(kSSEFloat64Add, g.DefineSameAsFirst(node), | 397 Emit(kSSEFloat64Add, g.DefineSameAsFirst(node), |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 if (descriptor->kind() == CallDescriptor::kCallAddress && | 555 if (descriptor->kind() == CallDescriptor::kCallAddress && |
| 556 buffer.pushed_count > 0) { | 556 buffer.pushed_count > 0) { |
| 557 ASSERT(deoptimization == NULL && continuation == NULL); | 557 ASSERT(deoptimization == NULL && continuation == NULL); |
| 558 Emit(kPopStack | MiscField::encode(buffer.pushed_count), NULL); | 558 Emit(kPopStack | MiscField::encode(buffer.pushed_count), NULL); |
| 559 } | 559 } |
| 560 } | 560 } |
| 561 | 561 |
| 562 } // namespace compiler | 562 } // namespace compiler |
| 563 } // namespace internal | 563 } // namespace internal |
| 564 } // namespace v8 | 564 } // namespace v8 |
| OLD | NEW |