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

Side by Side Diff: src/compiler/x64/code-generator-x64.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/wasm-compiler.cc ('k') | src/compiler/x64/instruction-codes-x64.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 929 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 case kSSEFloat32ToFloat64: 940 case kSSEFloat32ToFloat64:
941 ASSEMBLE_SSE_UNOP(Cvtss2sd); 941 ASSEMBLE_SSE_UNOP(Cvtss2sd);
942 break; 942 break;
943 case kSSEFloat32Round: { 943 case kSSEFloat32Round: {
944 CpuFeatureScope sse_scope(masm(), SSE4_1); 944 CpuFeatureScope sse_scope(masm(), SSE4_1);
945 RoundingMode const mode = 945 RoundingMode const mode =
946 static_cast<RoundingMode>(MiscField::decode(instr->opcode())); 946 static_cast<RoundingMode>(MiscField::decode(instr->opcode()));
947 __ Roundss(i.OutputDoubleRegister(), i.InputDoubleRegister(0), mode); 947 __ Roundss(i.OutputDoubleRegister(), i.InputDoubleRegister(0), mode);
948 break; 948 break;
949 } 949 }
950 case kSSEFloat32ToInt32:
951 if (instr->InputAt(0)->IsDoubleRegister()) {
952 __ Cvttss2si(i.OutputRegister(), i.InputDoubleRegister(0));
953 } else {
954 __ Cvttss2si(i.OutputRegister(), i.InputOperand(0));
955 }
956 break;
950 case kSSEFloat64Cmp: 957 case kSSEFloat64Cmp:
951 ASSEMBLE_SSE_BINOP(Ucomisd); 958 ASSEMBLE_SSE_BINOP(Ucomisd);
952 break; 959 break;
953 case kSSEFloat64Add: 960 case kSSEFloat64Add:
954 ASSEMBLE_SSE_BINOP(addsd); 961 ASSEMBLE_SSE_BINOP(addsd);
955 break; 962 break;
956 case kSSEFloat64Sub: 963 case kSSEFloat64Sub:
957 ASSEMBLE_SSE_BINOP(subsd); 964 ASSEMBLE_SSE_BINOP(subsd);
958 break; 965 break;
959 case kSSEFloat64Mul: 966 case kSSEFloat64Mul:
(...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after
2121 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2128 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2122 __ Nop(padding_size); 2129 __ Nop(padding_size);
2123 } 2130 }
2124 } 2131 }
2125 2132
2126 #undef __ 2133 #undef __
2127 2134
2128 } // namespace compiler 2135 } // namespace compiler
2129 } // namespace internal 2136 } // namespace internal
2130 } // namespace v8 2137 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | src/compiler/x64/instruction-codes-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698