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 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
742 case kSSEFloat64ToInt32: | 742 case kSSEFloat64ToInt32: |
743 __ cvttsd2si(i.OutputRegister(), i.InputOperand(0)); | 743 __ cvttsd2si(i.OutputRegister(), i.InputOperand(0)); |
744 break; | 744 break; |
745 case kSSEFloat64ToUint32: { | 745 case kSSEFloat64ToUint32: { |
746 __ Move(kScratchDoubleReg, -2147483648.0); | 746 __ Move(kScratchDoubleReg, -2147483648.0); |
747 __ addsd(kScratchDoubleReg, i.InputOperand(0)); | 747 __ addsd(kScratchDoubleReg, i.InputOperand(0)); |
748 __ cvttsd2si(i.OutputRegister(), kScratchDoubleReg); | 748 __ cvttsd2si(i.OutputRegister(), kScratchDoubleReg); |
749 __ add(i.OutputRegister(), Immediate(0x80000000)); | 749 __ add(i.OutputRegister(), Immediate(0x80000000)); |
750 break; | 750 break; |
751 } | 751 } |
| 752 case kSSEInt32ToFloat32: |
| 753 __ cvtsi2ss(i.OutputDoubleRegister(), i.InputOperand(0)); |
| 754 break; |
752 case kSSEInt32ToFloat64: | 755 case kSSEInt32ToFloat64: |
753 __ cvtsi2sd(i.OutputDoubleRegister(), i.InputOperand(0)); | 756 __ cvtsi2sd(i.OutputDoubleRegister(), i.InputOperand(0)); |
754 break; | 757 break; |
755 case kSSEUint32ToFloat64: | 758 case kSSEUint32ToFloat64: |
756 __ LoadUint32(i.OutputDoubleRegister(), i.InputOperand(0)); | 759 __ LoadUint32(i.OutputDoubleRegister(), i.InputOperand(0)); |
757 break; | 760 break; |
758 case kSSEFloat64ExtractLowWord32: | 761 case kSSEFloat64ExtractLowWord32: |
759 if (instr->InputAt(0)->IsDoubleStackSlot()) { | 762 if (instr->InputAt(0)->IsDoubleStackSlot()) { |
760 __ mov(i.OutputRegister(), i.InputOperand(0)); | 763 __ mov(i.OutputRegister(), i.InputOperand(0)); |
761 } else { | 764 } else { |
(...skipping 935 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 |