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 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1036 break; | 1036 break; |
1037 case kSSEFloat64ToUint32: { | 1037 case kSSEFloat64ToUint32: { |
1038 if (instr->InputAt(0)->IsDoubleRegister()) { | 1038 if (instr->InputAt(0)->IsDoubleRegister()) { |
1039 __ Cvttsd2siq(i.OutputRegister(), i.InputDoubleRegister(0)); | 1039 __ Cvttsd2siq(i.OutputRegister(), i.InputDoubleRegister(0)); |
1040 } else { | 1040 } else { |
1041 __ Cvttsd2siq(i.OutputRegister(), i.InputOperand(0)); | 1041 __ Cvttsd2siq(i.OutputRegister(), i.InputOperand(0)); |
1042 } | 1042 } |
1043 __ AssertZeroExtended(i.OutputRegister()); | 1043 __ AssertZeroExtended(i.OutputRegister()); |
1044 break; | 1044 break; |
1045 } | 1045 } |
1046 case kSSEFloat32ToInt64: | |
1047 if (instr->InputAt(0)->IsDoubleRegister()) { | |
1048 __ Cvttss2siq(i.OutputRegister(), i.InputDoubleRegister(0)); | |
1049 } else { | |
1050 __ Cvttss2siq(i.OutputRegister(), i.InputOperand(0)); | |
1051 } | |
1052 break; | |
1053 case kSSEFloat64ToInt64: | 1046 case kSSEFloat64ToInt64: |
1054 if (instr->InputAt(0)->IsDoubleRegister()) { | 1047 if (instr->InputAt(0)->IsDoubleRegister()) { |
1055 __ Cvttsd2siq(i.OutputRegister(), i.InputDoubleRegister(0)); | 1048 __ Cvttsd2siq(i.OutputRegister(), i.InputDoubleRegister(0)); |
1056 } else { | 1049 } else { |
1057 __ Cvttsd2siq(i.OutputRegister(), i.InputOperand(0)); | 1050 __ Cvttsd2siq(i.OutputRegister(), i.InputOperand(0)); |
1058 } | 1051 } |
1059 break; | 1052 break; |
1060 case kSSEFloat64ToUint64: { | 1053 case kSSEFloat64ToUint64: { |
1061 // There does not exist a Float64ToUint64 instruction, so we have to use | 1054 // There does not exist a Float64ToUint64 instruction, so we have to use |
1062 // the Float64ToInt64 instruction. | 1055 // the Float64ToInt64 instruction. |
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2011 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2004 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
2012 __ Nop(padding_size); | 2005 __ Nop(padding_size); |
2013 } | 2006 } |
2014 } | 2007 } |
2015 | 2008 |
2016 #undef __ | 2009 #undef __ |
2017 | 2010 |
2018 } // namespace compiler | 2011 } // namespace compiler |
2019 } // namespace internal | 2012 } // namespace internal |
2020 } // namespace v8 | 2013 } // namespace v8 |
OLD | NEW |