| 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 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1193 __ fstp(0); | 1193 __ fstp(0); |
| 1194 __ fld_s(i.MemoryOperand()); | 1194 __ fld_s(i.MemoryOperand()); |
| 1195 } else { | 1195 } else { |
| 1196 size_t index = 0; | 1196 size_t index = 0; |
| 1197 Operand operand = i.MemoryOperand(&index); | 1197 Operand operand = i.MemoryOperand(&index); |
| 1198 __ fst_s(operand); | 1198 __ fst_s(operand); |
| 1199 } | 1199 } |
| 1200 break; | 1200 break; |
| 1201 } | 1201 } |
| 1202 case kX87BitcastFI: { | 1202 case kX87BitcastFI: { |
| 1203 __ fstp(0); | |
| 1204 __ mov(i.OutputRegister(), MemOperand(esp, 0)); | 1203 __ mov(i.OutputRegister(), MemOperand(esp, 0)); |
| 1205 __ lea(esp, Operand(esp, kFloatSize)); | 1204 __ lea(esp, Operand(esp, kFloatSize)); |
| 1206 break; | 1205 break; |
| 1207 } | 1206 } |
| 1208 case kX87BitcastIF: { | 1207 case kX87BitcastIF: { |
| 1208 __ fstp(0); |
| 1209 if (instr->InputAt(0)->IsRegister()) { | 1209 if (instr->InputAt(0)->IsRegister()) { |
| 1210 __ lea(esp, Operand(esp, -kFloatSize)); | 1210 __ lea(esp, Operand(esp, -kFloatSize)); |
| 1211 __ mov(MemOperand(esp, 0), i.InputRegister(0)); | 1211 __ mov(MemOperand(esp, 0), i.InputRegister(0)); |
| 1212 __ fstp(0); | |
| 1213 __ fld_s(MemOperand(esp, 0)); | 1212 __ fld_s(MemOperand(esp, 0)); |
| 1214 __ lea(esp, Operand(esp, kFloatSize)); | 1213 __ lea(esp, Operand(esp, kFloatSize)); |
| 1215 } else { | 1214 } else { |
| 1216 __ lea(esp, Operand(esp, -kDoubleSize)); | 1215 __ fld_s(i.InputOperand(0)); |
| 1217 __ mov(MemOperand(esp, 0), i.InputRegister(0)); | |
| 1218 __ fstp(0); | |
| 1219 __ fld_d(MemOperand(esp, 0)); | |
| 1220 __ lea(esp, Operand(esp, kDoubleSize)); | |
| 1221 } | 1216 } |
| 1222 break; | 1217 break; |
| 1223 } | 1218 } |
| 1224 case kX87Lea: { | 1219 case kX87Lea: { |
| 1225 AddressingMode mode = AddressingModeField::decode(instr->opcode()); | 1220 AddressingMode mode = AddressingModeField::decode(instr->opcode()); |
| 1226 // Shorten "leal" to "addl", "subl" or "shll" if the register allocation | 1221 // Shorten "leal" to "addl", "subl" or "shll" if the register allocation |
| 1227 // and addressing mode just happens to work out. The "addl"/"subl" forms | 1222 // and addressing mode just happens to work out. The "addl"/"subl" forms |
| 1228 // in these cases are faster based on measurements. | 1223 // in these cases are faster based on measurements. |
| 1229 if (mode == kMode_MI) { | 1224 if (mode == kMode_MI) { |
| 1230 __ Move(i.OutputRegister(), Immediate(i.InputInt32(0))); | 1225 __ Move(i.OutputRegister(), Immediate(i.InputInt32(0))); |
| (...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2003 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 1998 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
| 2004 __ Nop(padding_size); | 1999 __ Nop(padding_size); |
| 2005 } | 2000 } |
| 2006 } | 2001 } |
| 2007 | 2002 |
| 2008 #undef __ | 2003 #undef __ |
| 2009 | 2004 |
| 2010 } // namespace compiler | 2005 } // namespace compiler |
| 2011 } // namespace internal | 2006 } // namespace internal |
| 2012 } // namespace v8 | 2007 } // namespace v8 |
| OLD | NEW |