Chromium Code Reviews

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: Cleanup Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 1033 matching lines...)
1044 } 1044 }
1045 __ AssertZeroExtended(i.OutputRegister()); 1045 __ AssertZeroExtended(i.OutputRegister());
1046 break; 1046 break;
1047 } 1047 }
1048 case kSSEFloat32ToInt64: 1048 case kSSEFloat32ToInt64:
1049 if (instr->InputAt(0)->IsDoubleRegister()) { 1049 if (instr->InputAt(0)->IsDoubleRegister()) {
1050 __ Cvttss2siq(i.OutputRegister(), i.InputDoubleRegister(0)); 1050 __ Cvttss2siq(i.OutputRegister(), i.InputDoubleRegister(0));
1051 } else { 1051 } else {
1052 __ Cvttss2siq(i.OutputRegister(), i.InputOperand(0)); 1052 __ Cvttss2siq(i.OutputRegister(), i.InputOperand(0));
1053 } 1053 }
1054 if (instr->OutputCount() > 1) {
1055 __ Set(i.OutputRegister(1), 0x8000000000000000);
1056 __ subq(i.OutputRegister(1), i.OutputRegister(0));
1057 }
1054 break; 1058 break;
1055 case kSSEFloat64ToInt64: 1059 case kSSEFloat64ToInt64:
1056 if (instr->InputAt(0)->IsDoubleRegister()) { 1060 if (instr->InputAt(0)->IsDoubleRegister()) {
1057 __ Cvttsd2siq(i.OutputRegister(0), i.InputDoubleRegister(0)); 1061 __ Cvttsd2siq(i.OutputRegister(0), i.InputDoubleRegister(0));
1058 } else { 1062 } else {
1059 __ Cvttsd2siq(i.OutputRegister(0), i.InputOperand(0)); 1063 __ Cvttsd2siq(i.OutputRegister(0), i.InputOperand(0));
1060 } 1064 }
1061 if (instr->OutputCount() > 1) { 1065 if (instr->OutputCount() > 1) {
1062 __ Set(i.OutputRegister(1), 0x8000000000000000); 1066 __ Set(i.OutputRegister(1), 0x8000000000000000);
1063 __ subq(i.OutputRegister(1), i.OutputRegister(0)); 1067 __ subq(i.OutputRegister(1), i.OutputRegister(0));
(...skipping 988 matching lines...)
2052 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2056 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2053 __ Nop(padding_size); 2057 __ Nop(padding_size);
2054 } 2058 }
2055 } 2059 }
2056 2060
2057 #undef __ 2061 #undef __
2058 2062
2059 } // namespace compiler 2063 } // namespace compiler
2060 } // namespace internal 2064 } // namespace internal
2061 } // namespace v8 2065 } // namespace v8
OLDNEW

Powered by Google App Engine