| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
| 6 | 6 |
| 7 #include "src/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
| 8 #include "src/compiler/gap-resolver.h" | 8 #include "src/compiler/gap-resolver.h" |
| 9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
| 10 #include "src/compiler/node-properties-inl.h" | 10 #include "src/compiler/node-properties-inl.h" |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 case kSSEFloat64ToInt32: { | 462 case kSSEFloat64ToInt32: { |
| 463 RegisterOrOperand input = i.InputRegisterOrOperand(0); | 463 RegisterOrOperand input = i.InputRegisterOrOperand(0); |
| 464 if (input.type == kDoubleRegister) { | 464 if (input.type == kDoubleRegister) { |
| 465 __ cvttsd2si(i.OutputRegister(), input.double_reg); | 465 __ cvttsd2si(i.OutputRegister(), input.double_reg); |
| 466 } else { | 466 } else { |
| 467 __ cvttsd2si(i.OutputRegister(), input.operand); | 467 __ cvttsd2si(i.OutputRegister(), input.operand); |
| 468 } | 468 } |
| 469 break; | 469 break; |
| 470 } | 470 } |
| 471 case kSSEFloat64ToUint32: { | 471 case kSSEFloat64ToUint32: { |
| 472 // TODO(turbofan): X64 SSE cvttsd2siq should support operands. | 472 RegisterOrOperand input = i.InputRegisterOrOperand(0); |
| 473 __ cvttsd2siq(i.OutputRegister(), i.InputDoubleRegister(0)); | 473 if (input.type == kDoubleRegister) { |
| 474 __ cvttsd2siq(i.OutputRegister(), input.double_reg); |
| 475 } else { |
| 476 __ cvttsd2siq(i.OutputRegister(), input.operand); |
| 477 } |
| 474 __ andl(i.OutputRegister(), i.OutputRegister()); // clear upper bits. | 478 __ andl(i.OutputRegister(), i.OutputRegister()); // clear upper bits. |
| 475 // TODO(turbofan): generated code should not look at the upper 32 bits | 479 // TODO(turbofan): generated code should not look at the upper 32 bits |
| 476 // of the result, but those bits could escape to the outside world. | 480 // of the result, but those bits could escape to the outside world. |
| 477 break; | 481 break; |
| 478 } | 482 } |
| 479 case kSSEInt32ToFloat64: { | 483 case kSSEInt32ToFloat64: { |
| 480 RegisterOrOperand input = i.InputRegisterOrOperand(0); | 484 RegisterOrOperand input = i.InputRegisterOrOperand(0); |
| 481 if (input.type == kRegister) { | 485 if (input.type == kRegister) { |
| 482 __ cvtlsi2sd(i.OutputDoubleRegister(), input.reg); | 486 __ cvtlsi2sd(i.OutputDoubleRegister(), input.reg); |
| 483 } else { | 487 } else { |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 999 } | 1003 } |
| 1000 | 1004 |
| 1001 | 1005 |
| 1002 void CodeGenerator::AddNopForSmiCodeInlining() { __ nop(); } | 1006 void CodeGenerator::AddNopForSmiCodeInlining() { __ nop(); } |
| 1003 | 1007 |
| 1004 #undef __ | 1008 #undef __ |
| 1005 | 1009 |
| 1006 } // namespace internal | 1010 } // namespace internal |
| 1007 } // namespace compiler | 1011 } // namespace compiler |
| 1008 } // namespace v8 | 1012 } // namespace v8 |
| OLD | NEW |