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

Side by Side Diff: src/compiler/x87/instruction-selector-x87.cc

Issue 1693963004: Add a kSimd128 machine type for Turbofan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 years, 10 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/ia32/assembler-ia32.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/base/adapters.h" 5 #include "src/base/adapters.h"
6 #include "src/compiler/instruction-selector-impl.h" 6 #include "src/compiler/instruction-selector-impl.h"
7 #include "src/compiler/node-matchers.h" 7 #include "src/compiler/node-matchers.h"
8 #include "src/compiler/node-properties.h" 8 #include "src/compiler/node-properties.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 case MachineRepresentation::kWord8: 144 case MachineRepresentation::kWord8:
145 opcode = load_rep.IsSigned() ? kX87Movsxbl : kX87Movzxbl; 145 opcode = load_rep.IsSigned() ? kX87Movsxbl : kX87Movzxbl;
146 break; 146 break;
147 case MachineRepresentation::kWord16: 147 case MachineRepresentation::kWord16:
148 opcode = load_rep.IsSigned() ? kX87Movsxwl : kX87Movzxwl; 148 opcode = load_rep.IsSigned() ? kX87Movsxwl : kX87Movzxwl;
149 break; 149 break;
150 case MachineRepresentation::kTagged: // Fall through. 150 case MachineRepresentation::kTagged: // Fall through.
151 case MachineRepresentation::kWord32: 151 case MachineRepresentation::kWord32:
152 opcode = kX87Movl; 152 opcode = kX87Movl;
153 break; 153 break;
154 case MachineRepresentation::kWord64: // Fall through. 154 case MachineRepresentation::kWord64: // Fall through.
155 case MachineRepresentation::kSimd128: // Fall through.
155 case MachineRepresentation::kNone: 156 case MachineRepresentation::kNone:
156 UNREACHABLE(); 157 UNREACHABLE();
157 return; 158 return;
158 } 159 }
159 160
160 X87OperandGenerator g(this); 161 X87OperandGenerator g(this);
161 InstructionOperand outputs[1]; 162 InstructionOperand outputs[1];
162 outputs[0] = g.DefineAsRegister(node); 163 outputs[0] = g.DefineAsRegister(node);
163 InstructionOperand inputs[3]; 164 InstructionOperand inputs[3];
164 size_t input_count = 0; 165 size_t input_count = 0;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 case MachineRepresentation::kWord8: 230 case MachineRepresentation::kWord8:
230 opcode = kX87Movb; 231 opcode = kX87Movb;
231 break; 232 break;
232 case MachineRepresentation::kWord16: 233 case MachineRepresentation::kWord16:
233 opcode = kX87Movw; 234 opcode = kX87Movw;
234 break; 235 break;
235 case MachineRepresentation::kTagged: // Fall through. 236 case MachineRepresentation::kTagged: // Fall through.
236 case MachineRepresentation::kWord32: 237 case MachineRepresentation::kWord32:
237 opcode = kX87Movl; 238 opcode = kX87Movl;
238 break; 239 break;
239 case MachineRepresentation::kWord64: // Fall through. 240 case MachineRepresentation::kWord64: // Fall through.
241 case MachineRepresentation::kSimd128: // Fall through.
240 case MachineRepresentation::kNone: 242 case MachineRepresentation::kNone:
241 UNREACHABLE(); 243 UNREACHABLE();
242 return; 244 return;
243 } 245 }
244 246
245 InstructionOperand val; 247 InstructionOperand val;
246 if (g.CanBeImmediate(value)) { 248 if (g.CanBeImmediate(value)) {
247 val = g.UseImmediate(value); 249 val = g.UseImmediate(value);
248 } else if (rep == MachineRepresentation::kWord8 || 250 } else if (rep == MachineRepresentation::kWord8 ||
249 rep == MachineRepresentation::kBit) { 251 rep == MachineRepresentation::kBit) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 break; 283 break;
282 case MachineRepresentation::kWord32: 284 case MachineRepresentation::kWord32:
283 opcode = kCheckedLoadWord32; 285 opcode = kCheckedLoadWord32;
284 break; 286 break;
285 case MachineRepresentation::kFloat32: 287 case MachineRepresentation::kFloat32:
286 opcode = kCheckedLoadFloat32; 288 opcode = kCheckedLoadFloat32;
287 break; 289 break;
288 case MachineRepresentation::kFloat64: 290 case MachineRepresentation::kFloat64:
289 opcode = kCheckedLoadFloat64; 291 opcode = kCheckedLoadFloat64;
290 break; 292 break;
291 case MachineRepresentation::kBit: // Fall through. 293 case MachineRepresentation::kBit: // Fall through.
292 case MachineRepresentation::kTagged: // Fall through. 294 case MachineRepresentation::kTagged: // Fall through.
293 case MachineRepresentation::kWord64: // Fall through. 295 case MachineRepresentation::kWord64: // Fall through.
296 case MachineRepresentation::kSimd128: // Fall through.
294 case MachineRepresentation::kNone: 297 case MachineRepresentation::kNone:
295 UNREACHABLE(); 298 UNREACHABLE();
296 return; 299 return;
297 } 300 }
298 InstructionOperand offset_operand = g.UseRegister(offset); 301 InstructionOperand offset_operand = g.UseRegister(offset);
299 InstructionOperand length_operand = 302 InstructionOperand length_operand =
300 g.CanBeImmediate(length) ? g.UseImmediate(length) : g.UseRegister(length); 303 g.CanBeImmediate(length) ? g.UseImmediate(length) : g.UseRegister(length);
301 if (g.CanBeImmediate(buffer)) { 304 if (g.CanBeImmediate(buffer)) {
302 Emit(opcode | AddressingModeField::encode(kMode_MRI), 305 Emit(opcode | AddressingModeField::encode(kMode_MRI),
303 g.DefineAsRegister(node), offset_operand, length_operand, 306 g.DefineAsRegister(node), offset_operand, length_operand,
(...skipping 23 matching lines...) Expand all
327 break; 330 break;
328 case MachineRepresentation::kWord32: 331 case MachineRepresentation::kWord32:
329 opcode = kCheckedStoreWord32; 332 opcode = kCheckedStoreWord32;
330 break; 333 break;
331 case MachineRepresentation::kFloat32: 334 case MachineRepresentation::kFloat32:
332 opcode = kCheckedStoreFloat32; 335 opcode = kCheckedStoreFloat32;
333 break; 336 break;
334 case MachineRepresentation::kFloat64: 337 case MachineRepresentation::kFloat64:
335 opcode = kCheckedStoreFloat64; 338 opcode = kCheckedStoreFloat64;
336 break; 339 break;
337 case MachineRepresentation::kBit: // Fall through. 340 case MachineRepresentation::kBit: // Fall through.
338 case MachineRepresentation::kTagged: // Fall through. 341 case MachineRepresentation::kTagged: // Fall through.
339 case MachineRepresentation::kWord64: // Fall through. 342 case MachineRepresentation::kWord64: // Fall through.
343 case MachineRepresentation::kSimd128: // Fall through.
340 case MachineRepresentation::kNone: 344 case MachineRepresentation::kNone:
341 UNREACHABLE(); 345 UNREACHABLE();
342 return; 346 return;
343 } 347 }
344 InstructionOperand value_operand = 348 InstructionOperand value_operand =
345 g.CanBeImmediate(value) ? g.UseImmediate(value) 349 g.CanBeImmediate(value) ? g.UseImmediate(value)
346 : ((rep == MachineRepresentation::kWord8 || 350 : ((rep == MachineRepresentation::kWord8 ||
347 rep == MachineRepresentation::kBit) 351 rep == MachineRepresentation::kBit)
348 ? g.UseByteRegister(value) 352 ? g.UseByteRegister(value)
349 : g.UseRegister(value)); 353 : g.UseRegister(value));
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
1366 MachineOperatorBuilder::kFloat32RoundTruncate | 1370 MachineOperatorBuilder::kFloat32RoundTruncate |
1367 MachineOperatorBuilder::kFloat64RoundTruncate | 1371 MachineOperatorBuilder::kFloat64RoundTruncate |
1368 MachineOperatorBuilder::kFloat32RoundTiesEven | 1372 MachineOperatorBuilder::kFloat32RoundTiesEven |
1369 MachineOperatorBuilder::kFloat64RoundTiesEven; 1373 MachineOperatorBuilder::kFloat64RoundTiesEven;
1370 return flags; 1374 return flags;
1371 } 1375 }
1372 1376
1373 } // namespace compiler 1377 } // namespace compiler
1374 } // namespace internal 1378 } // namespace internal
1375 } // namespace v8 1379 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x64/instruction-selector-x64.cc ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698