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 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 } else if (mode == kMode_M8) { | 993 } else if (mode == kMode_M8) { |
994 __ shl(i.OutputRegister(), 3); | 994 __ shl(i.OutputRegister(), 3); |
995 } else { | 995 } else { |
996 __ lea(i.OutputRegister(), i.MemoryOperand()); | 996 __ lea(i.OutputRegister(), i.MemoryOperand()); |
997 } | 997 } |
998 } else { | 998 } else { |
999 __ lea(i.OutputRegister(), i.MemoryOperand()); | 999 __ lea(i.OutputRegister(), i.MemoryOperand()); |
1000 } | 1000 } |
1001 break; | 1001 break; |
1002 } | 1002 } |
| 1003 case kIA32PushFloat32: |
| 1004 if (instr->InputAt(0)->IsDoubleRegister()) { |
| 1005 __ sub(esp, Immediate(kDoubleSize)); |
| 1006 __ movss(Operand(esp, 0), i.InputDoubleRegister(0)); |
| 1007 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); |
| 1008 } else if (HasImmediateInput(instr, 0)) { |
| 1009 __ Move(kScratchDoubleReg, i.InputDouble(0)); |
| 1010 __ sub(esp, Immediate(kDoubleSize)); |
| 1011 __ movss(Operand(esp, 0), kScratchDoubleReg); |
| 1012 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); |
| 1013 } else { |
| 1014 __ movsd(kScratchDoubleReg, i.InputOperand(0)); |
| 1015 __ sub(esp, Immediate(kDoubleSize)); |
| 1016 __ movss(Operand(esp, 0), kScratchDoubleReg); |
| 1017 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); |
| 1018 } |
| 1019 break; |
| 1020 case kIA32PushFloat64: |
| 1021 if (instr->InputAt(0)->IsDoubleRegister()) { |
| 1022 __ sub(esp, Immediate(kDoubleSize)); |
| 1023 __ movsd(Operand(esp, 0), i.InputDoubleRegister(0)); |
| 1024 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); |
| 1025 } else if (HasImmediateInput(instr, 0)) { |
| 1026 __ Move(kScratchDoubleReg, i.InputDouble(0)); |
| 1027 __ sub(esp, Immediate(kDoubleSize)); |
| 1028 __ movsd(Operand(esp, 0), kScratchDoubleReg); |
| 1029 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); |
| 1030 } else { |
| 1031 __ movsd(kScratchDoubleReg, i.InputOperand(0)); |
| 1032 __ sub(esp, Immediate(kDoubleSize)); |
| 1033 __ movsd(Operand(esp, 0), kScratchDoubleReg); |
| 1034 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); |
| 1035 } |
| 1036 break; |
1003 case kIA32Push: | 1037 case kIA32Push: |
1004 if (instr->InputAt(0)->IsDoubleRegister()) { | 1038 if (instr->InputAt(0)->IsDoubleRegister()) { |
1005 __ sub(esp, Immediate(kDoubleSize)); | 1039 __ sub(esp, Immediate(kDoubleSize)); |
1006 __ movsd(Operand(esp, 0), i.InputDoubleRegister(0)); | 1040 __ movsd(Operand(esp, 0), i.InputDoubleRegister(0)); |
1007 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); | 1041 frame_access_state()->IncreaseSPDelta(kDoubleSize / kPointerSize); |
1008 } else if (HasImmediateInput(instr, 0)) { | 1042 } else if (HasImmediateInput(instr, 0)) { |
1009 __ push(i.InputImmediate(0)); | 1043 __ push(i.InputImmediate(0)); |
1010 frame_access_state()->IncreaseSPDelta(1); | 1044 frame_access_state()->IncreaseSPDelta(1); |
1011 } else { | 1045 } else { |
1012 __ push(i.InputOperand(0)); | 1046 __ push(i.InputOperand(0)); |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1655 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 1689 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
1656 __ Nop(padding_size); | 1690 __ Nop(padding_size); |
1657 } | 1691 } |
1658 } | 1692 } |
1659 | 1693 |
1660 #undef __ | 1694 #undef __ |
1661 | 1695 |
1662 } // namespace compiler | 1696 } // namespace compiler |
1663 } // namespace internal | 1697 } // namespace internal |
1664 } // namespace v8 | 1698 } // namespace v8 |
OLD | NEW |