Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(750)

Side by Side Diff: src/compiler/x64/code-generator-x64.cc

Issue 1504363002: [turbofan] Change TruncateFloat32ToInt64 to TryTruncateFloat32ToInt64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 } 1042 }
1043 __ AssertZeroExtended(i.OutputRegister()); 1043 __ AssertZeroExtended(i.OutputRegister());
1044 break; 1044 break;
1045 } 1045 }
1046 case kSSEFloat32ToInt64: 1046 case kSSEFloat32ToInt64:
1047 if (instr->InputAt(0)->IsDoubleRegister()) { 1047 if (instr->InputAt(0)->IsDoubleRegister()) {
1048 __ Cvttss2siq(i.OutputRegister(), i.InputDoubleRegister(0)); 1048 __ Cvttss2siq(i.OutputRegister(), i.InputDoubleRegister(0));
1049 } else { 1049 } else {
1050 __ Cvttss2siq(i.OutputRegister(), i.InputOperand(0)); 1050 __ Cvttss2siq(i.OutputRegister(), i.InputOperand(0));
1051 } 1051 }
1052 if (instr->OutputCount() > 1) {
1053 __ Set(i.OutputRegister(1), 0x8000000000000000);
1054 __ subq(i.OutputRegister(1), i.OutputRegister(0));
1055 }
1052 break; 1056 break;
1053 case kSSEFloat64ToInt64: 1057 case kSSEFloat64ToInt64:
1054 if (instr->InputAt(0)->IsDoubleRegister()) { 1058 if (instr->InputAt(0)->IsDoubleRegister()) {
1055 __ Cvttsd2siq(i.OutputRegister(0), i.InputDoubleRegister(0)); 1059 __ Cvttsd2siq(i.OutputRegister(0), i.InputDoubleRegister(0));
1056 } else { 1060 } else {
1057 __ Cvttsd2siq(i.OutputRegister(0), i.InputOperand(0)); 1061 __ Cvttsd2siq(i.OutputRegister(0), i.InputOperand(0));
1058 } 1062 }
1059 if (instr->OutputCount() > 1) { 1063 if (instr->OutputCount() > 1) {
1060 __ Set(i.OutputRegister(1), 0x8000000000000000); 1064 __ Set(i.OutputRegister(1), 0x8000000000000000);
1061 __ subq(i.OutputRegister(1), i.OutputRegister(0)); 1065 __ subq(i.OutputRegister(1), i.OutputRegister(0));
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
2050 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2054 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2051 __ Nop(padding_size); 2055 __ Nop(padding_size);
2052 } 2056 }
2053 } 2057 }
2054 2058
2055 #undef __ 2059 #undef __
2056 2060
2057 } // namespace compiler 2061 } // namespace compiler
2058 } // namespace internal 2062 } // namespace internal
2059 } // namespace v8 2063 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698