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

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

Issue 1583323004: [turbofan] Add the TruncateFloat32ToInt32 operator to turbofan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed a small bug Created 4 years, 11 months 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
« no previous file with comments | « src/compiler/x64/instruction-selector-x64.cc ('k') | src/compiler/x87/instruction-codes-x87.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « src/compiler/x64/instruction-selector-x64.cc ('k') | src/compiler/x87/instruction-codes-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698