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 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
998 __ fstp(0); | 998 __ fstp(0); |
999 __ fld_s(i.InputOperand(0)); | 999 __ fld_s(i.InputOperand(0)); |
1000 } | 1000 } |
1001 break; | 1001 break; |
1002 } | 1002 } |
1003 case kX87Uint32ToFloat64: { | 1003 case kX87Uint32ToFloat64: { |
1004 __ fstp(0); | 1004 __ fstp(0); |
1005 __ LoadUint32NoSSE2(i.InputRegister(0)); | 1005 __ LoadUint32NoSSE2(i.InputRegister(0)); |
1006 break; | 1006 break; |
1007 } | 1007 } |
| 1008 case kX87Float32ToInt32: { |
| 1009 if (!instr->InputAt(0)->IsDoubleRegister()) { |
| 1010 __ fld_s(i.InputOperand(0)); |
| 1011 } |
| 1012 __ TruncateX87TOSToI(i.OutputRegister(0)); |
| 1013 if (!instr->InputAt(0)->IsDoubleRegister()) { |
| 1014 __ fstp(0); |
| 1015 } |
| 1016 break; |
| 1017 } |
1008 case kX87Float64ToInt32: { | 1018 case kX87Float64ToInt32: { |
1009 if (!instr->InputAt(0)->IsDoubleRegister()) { | 1019 if (!instr->InputAt(0)->IsDoubleRegister()) { |
1010 __ fld_d(i.InputOperand(0)); | 1020 __ fld_d(i.InputOperand(0)); |
1011 } | 1021 } |
1012 __ TruncateX87TOSToI(i.OutputRegister(0)); | 1022 __ TruncateX87TOSToI(i.OutputRegister(0)); |
1013 if (!instr->InputAt(0)->IsDoubleRegister()) { | 1023 if (!instr->InputAt(0)->IsDoubleRegister()) { |
1014 __ fstp(0); | 1024 __ fstp(0); |
1015 } | 1025 } |
1016 break; | 1026 break; |
1017 } | 1027 } |
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1997 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2007 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
1998 __ Nop(padding_size); | 2008 __ Nop(padding_size); |
1999 } | 2009 } |
2000 } | 2010 } |
2001 | 2011 |
2002 #undef __ | 2012 #undef __ |
2003 | 2013 |
2004 } // namespace compiler | 2014 } // namespace compiler |
2005 } // namespace internal | 2015 } // namespace internal |
2006 } // namespace v8 | 2016 } // namespace v8 |
OLD | NEW |