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 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 case kSSEFloat64ToUint32: { | 748 case kSSEFloat64ToUint32: { |
749 __ Move(kScratchDoubleReg, -2147483648.0); | 749 __ Move(kScratchDoubleReg, -2147483648.0); |
750 __ addsd(kScratchDoubleReg, i.InputOperand(0)); | 750 __ addsd(kScratchDoubleReg, i.InputOperand(0)); |
751 __ cvttsd2si(i.OutputRegister(), kScratchDoubleReg); | 751 __ cvttsd2si(i.OutputRegister(), kScratchDoubleReg); |
752 __ add(i.OutputRegister(), Immediate(0x80000000)); | 752 __ add(i.OutputRegister(), Immediate(0x80000000)); |
753 break; | 753 break; |
754 } | 754 } |
755 case kSSEInt32ToFloat32: | 755 case kSSEInt32ToFloat32: |
756 __ cvtsi2ss(i.OutputDoubleRegister(), i.InputOperand(0)); | 756 __ cvtsi2ss(i.OutputDoubleRegister(), i.InputOperand(0)); |
757 break; | 757 break; |
| 758 case kSSEUint32ToFloat32: { |
| 759 Register scratch0 = i.TempRegister(0); |
| 760 Register scratch1 = i.TempRegister(1); |
| 761 __ mov(scratch0, i.InputOperand(0)); |
| 762 __ Cvtui2ss(i.OutputDoubleRegister(), scratch0, scratch1); |
| 763 break; |
| 764 } |
758 case kSSEInt32ToFloat64: | 765 case kSSEInt32ToFloat64: |
759 __ cvtsi2sd(i.OutputDoubleRegister(), i.InputOperand(0)); | 766 __ cvtsi2sd(i.OutputDoubleRegister(), i.InputOperand(0)); |
760 break; | 767 break; |
761 case kSSEUint32ToFloat64: | 768 case kSSEUint32ToFloat64: |
762 __ LoadUint32(i.OutputDoubleRegister(), i.InputOperand(0)); | 769 __ LoadUint32(i.OutputDoubleRegister(), i.InputOperand(0)); |
763 break; | 770 break; |
764 case kSSEFloat64ExtractLowWord32: | 771 case kSSEFloat64ExtractLowWord32: |
765 if (instr->InputAt(0)->IsDoubleStackSlot()) { | 772 if (instr->InputAt(0)->IsDoubleStackSlot()) { |
766 __ mov(i.OutputRegister(), i.InputOperand(0)); | 773 __ mov(i.OutputRegister(), i.InputOperand(0)); |
767 } else { | 774 } else { |
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1703 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 1710 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
1704 __ Nop(padding_size); | 1711 __ Nop(padding_size); |
1705 } | 1712 } |
1706 } | 1713 } |
1707 | 1714 |
1708 #undef __ | 1715 #undef __ |
1709 | 1716 |
1710 } // namespace compiler | 1717 } // namespace compiler |
1711 } // namespace internal | 1718 } // namespace internal |
1712 } // namespace v8 | 1719 } // namespace v8 |
OLD | NEW |