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/osr.h" | 10 #include "src/compiler/osr.h" |
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
833 break; | 833 break; |
834 case kIA32Movss: | 834 case kIA32Movss: |
835 if (instr->HasOutput()) { | 835 if (instr->HasOutput()) { |
836 __ movss(i.OutputDoubleRegister(), i.MemoryOperand()); | 836 __ movss(i.OutputDoubleRegister(), i.MemoryOperand()); |
837 } else { | 837 } else { |
838 size_t index = 0; | 838 size_t index = 0; |
839 Operand operand = i.MemoryOperand(&index); | 839 Operand operand = i.MemoryOperand(&index); |
840 __ movss(operand, i.InputDoubleRegister(index)); | 840 __ movss(operand, i.InputDoubleRegister(index)); |
841 } | 841 } |
842 break; | 842 break; |
| 843 case kIA32BitcastFI: |
| 844 if (instr->InputAt(0)->IsDoubleStackSlot()) { |
| 845 __ mov(i.OutputRegister(), i.InputOperand(0)); |
| 846 } else { |
| 847 __ movd(i.OutputRegister(), i.InputDoubleRegister(0)); |
| 848 } |
| 849 break; |
| 850 case kIA32BitcastIF: |
| 851 if (instr->InputAt(0)->IsRegister()) { |
| 852 __ movd(i.OutputDoubleRegister(), i.InputRegister(0)); |
| 853 } else { |
| 854 __ movss(i.OutputDoubleRegister(), i.InputOperand(0)); |
| 855 } |
| 856 break; |
843 case kIA32Lea: { | 857 case kIA32Lea: { |
844 AddressingMode mode = AddressingModeField::decode(instr->opcode()); | 858 AddressingMode mode = AddressingModeField::decode(instr->opcode()); |
845 // Shorten "leal" to "addl", "subl" or "shll" if the register allocation | 859 // Shorten "leal" to "addl", "subl" or "shll" if the register allocation |
846 // and addressing mode just happens to work out. The "addl"/"subl" forms | 860 // and addressing mode just happens to work out. The "addl"/"subl" forms |
847 // in these cases are faster based on measurements. | 861 // in these cases are faster based on measurements. |
848 if (mode == kMode_MI) { | 862 if (mode == kMode_MI) { |
849 __ Move(i.OutputRegister(), Immediate(i.InputInt32(0))); | 863 __ Move(i.OutputRegister(), Immediate(i.InputInt32(0))); |
850 } else if (i.InputRegister(0).is(i.OutputRegister())) { | 864 } else if (i.InputRegister(0).is(i.OutputRegister())) { |
851 if (mode == kMode_MRI) { | 865 if (mode == kMode_MRI) { |
852 int32_t constant_summand = i.InputInt32(1); | 866 int32_t constant_summand = i.InputInt32(1); |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1534 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 1548 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
1535 __ Nop(padding_size); | 1549 __ Nop(padding_size); |
1536 } | 1550 } |
1537 } | 1551 } |
1538 | 1552 |
1539 #undef __ | 1553 #undef __ |
1540 | 1554 |
1541 } // namespace compiler | 1555 } // namespace compiler |
1542 } // namespace internal | 1556 } // namespace internal |
1543 } // namespace v8 | 1557 } // namespace v8 |
OLD | NEW |