| 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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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: { | 496 case kSSEFloat64ToUint32: { |
| 497 // TODO(turbofan): X64 SSE cvttsd2siq should support operands. | 497 // TODO(turbofan): X64 SSE cvttsd2siq should support operands. |
| 498 __ cvttsd2siq(i.OutputRegister(), i.InputDoubleRegister(0)); | 498 __ cvttsd2siq(i.OutputRegister(), i.InputDoubleRegister(0)); |
| 499 __ andl(i.OutputRegister(), i.OutputRegister()); // clear upper bits. |
| 500 // TODO(turbofan): generated code should not look at the upper 32 bits |
| 501 // of the result, but those bits could escape to the outside world. |
| 499 break; | 502 break; |
| 500 } | 503 } |
| 501 case kSSEInt32ToFloat64: { | 504 case kSSEInt32ToFloat64: { |
| 502 RegisterOrOperand input = i.InputRegisterOrOperand(0); | 505 RegisterOrOperand input = i.InputRegisterOrOperand(0); |
| 503 if (input.type == kRegister) { | 506 if (input.type == kRegister) { |
| 504 __ cvtlsi2sd(i.OutputDoubleRegister(), input.reg); | 507 __ cvtlsi2sd(i.OutputDoubleRegister(), input.reg); |
| 505 } else { | 508 } else { |
| 506 __ cvtlsi2sd(i.OutputDoubleRegister(), input.operand); | 509 __ cvtlsi2sd(i.OutputDoubleRegister(), input.operand); |
| 507 } | 510 } |
| 508 break; | 511 break; |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 return false; | 977 return false; |
| 975 } | 978 } |
| 976 return *(code->instruction_start() + start_pc) == | 979 return *(code->instruction_start() + start_pc) == |
| 977 v8::internal::Assembler::kNopByte; | 980 v8::internal::Assembler::kNopByte; |
| 978 } | 981 } |
| 979 | 982 |
| 980 #endif | 983 #endif |
| 981 } | 984 } |
| 982 } | 985 } |
| 983 } // namespace v8::internal::compiler | 986 } // namespace v8::internal::compiler |
| OLD | NEW |