| 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/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
| 9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
| 10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
| (...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 static_cast<RoundingMode>(MiscField::decode(instr->opcode())); | 732 static_cast<RoundingMode>(MiscField::decode(instr->opcode())); |
| 733 __ roundsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0), mode); | 733 __ roundsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0), mode); |
| 734 break; | 734 break; |
| 735 } | 735 } |
| 736 case kSSEFloat32ToFloat64: | 736 case kSSEFloat32ToFloat64: |
| 737 __ cvtss2sd(i.OutputDoubleRegister(), i.InputOperand(0)); | 737 __ cvtss2sd(i.OutputDoubleRegister(), i.InputOperand(0)); |
| 738 break; | 738 break; |
| 739 case kSSEFloat64ToFloat32: | 739 case kSSEFloat64ToFloat32: |
| 740 __ cvtsd2ss(i.OutputDoubleRegister(), i.InputOperand(0)); | 740 __ cvtsd2ss(i.OutputDoubleRegister(), i.InputOperand(0)); |
| 741 break; | 741 break; |
| 742 case kSSEFloat32ToInt32: |
| 743 __ cvttss2si(i.OutputRegister(), i.InputOperand(0)); |
| 744 break; |
| 742 case kSSEFloat64ToInt32: | 745 case kSSEFloat64ToInt32: |
| 743 __ cvttsd2si(i.OutputRegister(), i.InputOperand(0)); | 746 __ cvttsd2si(i.OutputRegister(), i.InputOperand(0)); |
| 744 break; | 747 break; |
| 745 case kSSEFloat64ToUint32: { | 748 case kSSEFloat64ToUint32: { |
| 746 __ Move(kScratchDoubleReg, -2147483648.0); | 749 __ Move(kScratchDoubleReg, -2147483648.0); |
| 747 __ addsd(kScratchDoubleReg, i.InputOperand(0)); | 750 __ addsd(kScratchDoubleReg, i.InputOperand(0)); |
| 748 __ cvttsd2si(i.OutputRegister(), kScratchDoubleReg); | 751 __ cvttsd2si(i.OutputRegister(), kScratchDoubleReg); |
| 749 __ add(i.OutputRegister(), Immediate(0x80000000)); | 752 __ add(i.OutputRegister(), Immediate(0x80000000)); |
| 750 break; | 753 break; |
| 751 } | 754 } |
| (...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1697 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 1700 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
| 1698 __ Nop(padding_size); | 1701 __ Nop(padding_size); |
| 1699 } | 1702 } |
| 1700 } | 1703 } |
| 1701 | 1704 |
| 1702 #undef __ | 1705 #undef __ |
| 1703 | 1706 |
| 1704 } // namespace compiler | 1707 } // namespace compiler |
| 1705 } // namespace internal | 1708 } // namespace internal |
| 1706 } // namespace v8 | 1709 } // namespace v8 |
| OLD | NEW |