| 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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 break; | 486 break; |
| 487 case kSSEFloat64ToInt32: { | 487 case kSSEFloat64ToInt32: { |
| 488 RegisterOrOperand input = i.InputRegisterOrOperand(0); | 488 RegisterOrOperand input = i.InputRegisterOrOperand(0); |
| 489 if (input.type == kDoubleRegister) { | 489 if (input.type == kDoubleRegister) { |
| 490 __ cvttsd2si(i.OutputRegister(), input.double_reg); | 490 __ cvttsd2si(i.OutputRegister(), input.double_reg); |
| 491 } else { | 491 } else { |
| 492 __ cvttsd2si(i.OutputRegister(), input.operand); | 492 __ cvttsd2si(i.OutputRegister(), input.operand); |
| 493 } | 493 } |
| 494 break; | 494 break; |
| 495 } | 495 } |
| 496 case kSSEFloat64ToUint32: { |
| 497 // TODO(turbofan): X64 SSE cvttsd2siq should support operands. |
| 498 __ cvttsd2siq(i.OutputRegister(), i.InputDoubleRegister(0)); |
| 499 break; |
| 500 } |
| 496 case kSSEInt32ToFloat64: { | 501 case kSSEInt32ToFloat64: { |
| 497 RegisterOrOperand input = i.InputRegisterOrOperand(0); | 502 RegisterOrOperand input = i.InputRegisterOrOperand(0); |
| 498 if (input.type == kRegister) { | 503 if (input.type == kRegister) { |
| 499 __ cvtlsi2sd(i.OutputDoubleRegister(), input.reg); | 504 __ cvtlsi2sd(i.OutputDoubleRegister(), input.reg); |
| 500 } else { | 505 } else { |
| 501 __ cvtlsi2sd(i.OutputDoubleRegister(), input.operand); | 506 __ cvtlsi2sd(i.OutputDoubleRegister(), input.operand); |
| 502 } | 507 } |
| 503 break; | 508 break; |
| 504 } | 509 } |
| 510 case kSSEUint32ToFloat64: { |
| 511 // TODO(turbofan): X64 SSE cvtqsi2sd should support operands. |
| 512 __ cvtqsi2sd(i.OutputDoubleRegister(), i.InputRegister(0)); |
| 513 break; |
| 514 } |
| 515 |
| 505 case kSSELoad: | 516 case kSSELoad: |
| 506 __ movsd(i.OutputDoubleRegister(), i.MemoryOperand()); | 517 __ movsd(i.OutputDoubleRegister(), i.MemoryOperand()); |
| 507 break; | 518 break; |
| 508 case kSSEStore: { | 519 case kSSEStore: { |
| 509 int index = 0; | 520 int index = 0; |
| 510 Operand operand = i.MemoryOperand(&index); | 521 Operand operand = i.MemoryOperand(&index); |
| 511 __ movsd(operand, i.InputDoubleRegister(index)); | 522 __ movsd(operand, i.InputDoubleRegister(index)); |
| 512 break; | 523 break; |
| 513 } | 524 } |
| 514 case kX64LoadWord8: | 525 case kX64LoadWord8: |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 963 return false; | 974 return false; |
| 964 } | 975 } |
| 965 return *(code->instruction_start() + start_pc) == | 976 return *(code->instruction_start() + start_pc) == |
| 966 v8::internal::Assembler::kNopByte; | 977 v8::internal::Assembler::kNopByte; |
| 967 } | 978 } |
| 968 | 979 |
| 969 #endif | 980 #endif |
| 970 } | 981 } |
| 971 } | 982 } |
| 972 } // namespace v8::internal::compiler | 983 } // namespace v8::internal::compiler |
| OLD | NEW |