| 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/scopes.h" | 10 #include "src/scopes.h" |
| (...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1097 __ shl(i.OutputRegister(), 3); | 1097 __ shl(i.OutputRegister(), 3); |
| 1098 } else { | 1098 } else { |
| 1099 __ lea(i.OutputRegister(), i.MemoryOperand()); | 1099 __ lea(i.OutputRegister(), i.MemoryOperand()); |
| 1100 } | 1100 } |
| 1101 } else { | 1101 } else { |
| 1102 __ lea(i.OutputRegister(), i.MemoryOperand()); | 1102 __ lea(i.OutputRegister(), i.MemoryOperand()); |
| 1103 } | 1103 } |
| 1104 break; | 1104 break; |
| 1105 } | 1105 } |
| 1106 case kX87Push: | 1106 case kX87Push: |
| 1107 if (HasImmediateInput(instr, 0)) { | 1107 if (instr->InputAt(0)->IsDoubleRegister()) { |
| 1108 auto allocated = AllocatedOperand::cast(*instr->InputAt(0)); |
| 1109 if (allocated.machine_type() == kRepFloat32) { |
| 1110 __ sub(esp, Immediate(kDoubleSize)); |
| 1111 __ fst_s(Operand(esp, 0)); |
| 1112 } else { |
| 1113 DCHECK(allocated.machine_type() == kRepFloat64); |
| 1114 __ sub(esp, Immediate(kDoubleSize)); |
| 1115 __ fst_d(Operand(esp, 0)); |
| 1116 } |
| 1117 } else if (instr->InputAt(0)->IsDoubleStackSlot()) { |
| 1118 auto allocated = AllocatedOperand::cast(*instr->InputAt(0)); |
| 1119 if (allocated.machine_type() == kRepFloat32) { |
| 1120 __ sub(esp, Immediate(kDoubleSize)); |
| 1121 __ fld_s(i.InputOperand(0)); |
| 1122 __ fstp_s(MemOperand(esp, 0)); |
| 1123 } else { |
| 1124 DCHECK(allocated.machine_type() == kRepFloat64); |
| 1125 __ sub(esp, Immediate(kDoubleSize)); |
| 1126 __ fld_d(i.InputOperand(0)); |
| 1127 __ fstp_d(MemOperand(esp, 0)); |
| 1128 } |
| 1129 } else if (HasImmediateInput(instr, 0)) { |
| 1108 __ push(i.InputImmediate(0)); | 1130 __ push(i.InputImmediate(0)); |
| 1109 } else { | 1131 } else { |
| 1110 __ push(i.InputOperand(0)); | 1132 __ push(i.InputOperand(0)); |
| 1111 } | 1133 } |
| 1112 break; | 1134 break; |
| 1113 case kX87Poke: { | 1135 case kX87Poke: { |
| 1114 int const slot = MiscField::decode(instr->opcode()); | 1136 int const slot = MiscField::decode(instr->opcode()); |
| 1115 if (HasImmediateInput(instr, 0)) { | 1137 if (HasImmediateInput(instr, 0)) { |
| 1116 __ mov(Operand(esp, slot * kPointerSize), i.InputImmediate(0)); | 1138 __ mov(Operand(esp, slot * kPointerSize), i.InputImmediate(0)); |
| 1117 } else { | 1139 } else { |
| (...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1835 __ Nop(padding_size); | 1857 __ Nop(padding_size); |
| 1836 } | 1858 } |
| 1837 } | 1859 } |
| 1838 } | 1860 } |
| 1839 | 1861 |
| 1840 #undef __ | 1862 #undef __ |
| 1841 | 1863 |
| 1842 } // namespace compiler | 1864 } // namespace compiler |
| 1843 } // namespace internal | 1865 } // namespace internal |
| 1844 } // namespace v8 | 1866 } // namespace v8 |
| OLD | NEW |