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

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

Issue 1843983002: [wasm] Fixed float-to-int conversion tests. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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-selector-x64.cc » ('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 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 } else { 1052 } else {
1053 __ Cvttss2si(i.OutputRegister(), i.InputOperand(0)); 1053 __ Cvttss2si(i.OutputRegister(), i.InputOperand(0));
1054 } 1054 }
1055 break; 1055 break;
1056 case kSSEFloat32ToUint32: { 1056 case kSSEFloat32ToUint32: {
1057 if (instr->InputAt(0)->IsDoubleRegister()) { 1057 if (instr->InputAt(0)->IsDoubleRegister()) {
1058 __ Cvttss2siq(i.OutputRegister(), i.InputDoubleRegister(0)); 1058 __ Cvttss2siq(i.OutputRegister(), i.InputDoubleRegister(0));
1059 } else { 1059 } else {
1060 __ Cvttss2siq(i.OutputRegister(), i.InputOperand(0)); 1060 __ Cvttss2siq(i.OutputRegister(), i.InputOperand(0));
1061 } 1061 }
1062 __ AssertZeroExtended(i.OutputRegister());
1063 break; 1062 break;
1064 } 1063 }
1065 case kSSEFloat64Cmp: 1064 case kSSEFloat64Cmp:
1066 ASSEMBLE_SSE_BINOP(Ucomisd); 1065 ASSEMBLE_SSE_BINOP(Ucomisd);
1067 break; 1066 break;
1068 case kSSEFloat64Add: 1067 case kSSEFloat64Add:
1069 ASSEMBLE_SSE_BINOP(addsd); 1068 ASSEMBLE_SSE_BINOP(addsd);
1070 break; 1069 break;
1071 case kSSEFloat64Sub: 1070 case kSSEFloat64Sub:
1072 ASSEMBLE_SSE_BINOP(subsd); 1071 ASSEMBLE_SSE_BINOP(subsd);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 } else { 1150 } else {
1152 __ Cvttsd2si(i.OutputRegister(), i.InputOperand(0)); 1151 __ Cvttsd2si(i.OutputRegister(), i.InputOperand(0));
1153 } 1152 }
1154 break; 1153 break;
1155 case kSSEFloat64ToUint32: { 1154 case kSSEFloat64ToUint32: {
1156 if (instr->InputAt(0)->IsDoubleRegister()) { 1155 if (instr->InputAt(0)->IsDoubleRegister()) {
1157 __ Cvttsd2siq(i.OutputRegister(), i.InputDoubleRegister(0)); 1156 __ Cvttsd2siq(i.OutputRegister(), i.InputDoubleRegister(0));
1158 } else { 1157 } else {
1159 __ Cvttsd2siq(i.OutputRegister(), i.InputOperand(0)); 1158 __ Cvttsd2siq(i.OutputRegister(), i.InputOperand(0));
1160 } 1159 }
1161 __ AssertZeroExtended(i.OutputRegister()); 1160 if (MiscField::decode(instr->opcode())) {
1161 __ AssertZeroExtended(i.OutputRegister());
1162 }
1162 break; 1163 break;
1163 } 1164 }
1164 case kSSEFloat32ToInt64: 1165 case kSSEFloat32ToInt64:
1165 if (instr->InputAt(0)->IsDoubleRegister()) { 1166 if (instr->InputAt(0)->IsDoubleRegister()) {
1166 __ Cvttss2siq(i.OutputRegister(), i.InputDoubleRegister(0)); 1167 __ Cvttss2siq(i.OutputRegister(), i.InputDoubleRegister(0));
1167 } else { 1168 } else {
1168 __ Cvttss2siq(i.OutputRegister(), i.InputOperand(0)); 1169 __ Cvttss2siq(i.OutputRegister(), i.InputOperand(0));
1169 } 1170 }
1170 if (instr->OutputCount() > 1) { 1171 if (instr->OutputCount() > 1) {
1171 __ Set(i.OutputRegister(1), 1); 1172 __ Set(i.OutputRegister(1), 1);
(...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after
2245 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2246 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2246 __ Nop(padding_size); 2247 __ Nop(padding_size);
2247 } 2248 }
2248 } 2249 }
2249 2250
2250 #undef __ 2251 #undef __
2251 2252
2252 } // namespace compiler 2253 } // namespace compiler
2253 } // namespace internal 2254 } // namespace internal
2254 } // namespace v8 2255 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | src/compiler/x64/instruction-selector-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698