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/ia32/instruction-selector-ia32.cc

Issue 2700813002: [V8] Implement SIMD Boolean vector types to allow mask registers. (Closed)
Patch Set: Rebase. Created 3 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/arm64/instruction-selector-arm64.cc ('k') | src/compiler/instruction.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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 opcode = load_rep.IsSigned() ? kIA32Movsxwl : kIA32Movzxwl; 227 opcode = load_rep.IsSigned() ? kIA32Movsxwl : kIA32Movzxwl;
228 break; 228 break;
229 case MachineRepresentation::kTaggedSigned: // Fall through. 229 case MachineRepresentation::kTaggedSigned: // Fall through.
230 case MachineRepresentation::kTaggedPointer: // Fall through. 230 case MachineRepresentation::kTaggedPointer: // Fall through.
231 case MachineRepresentation::kTagged: // Fall through. 231 case MachineRepresentation::kTagged: // Fall through.
232 case MachineRepresentation::kWord32: 232 case MachineRepresentation::kWord32:
233 opcode = kIA32Movl; 233 opcode = kIA32Movl;
234 break; 234 break;
235 case MachineRepresentation::kWord64: // Fall through. 235 case MachineRepresentation::kWord64: // Fall through.
236 case MachineRepresentation::kSimd128: // Fall through. 236 case MachineRepresentation::kSimd128: // Fall through.
237 case MachineRepresentation::kSimd1x4: // Fall through.
238 case MachineRepresentation::kSimd1x8: // Fall through.
239 case MachineRepresentation::kSimd1x16: // Fall through.
237 case MachineRepresentation::kNone: 240 case MachineRepresentation::kNone:
238 UNREACHABLE(); 241 UNREACHABLE();
239 return; 242 return;
240 } 243 }
241 244
242 IA32OperandGenerator g(this); 245 IA32OperandGenerator g(this);
243 InstructionOperand outputs[1]; 246 InstructionOperand outputs[1];
244 outputs[0] = g.DefineAsRegister(node); 247 outputs[0] = g.DefineAsRegister(node);
245 InstructionOperand inputs[3]; 248 InstructionOperand inputs[3];
246 size_t input_count = 0; 249 size_t input_count = 0;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 opcode = kIA32Movw; 320 opcode = kIA32Movw;
318 break; 321 break;
319 case MachineRepresentation::kTaggedSigned: // Fall through. 322 case MachineRepresentation::kTaggedSigned: // Fall through.
320 case MachineRepresentation::kTaggedPointer: // Fall through. 323 case MachineRepresentation::kTaggedPointer: // Fall through.
321 case MachineRepresentation::kTagged: // Fall through. 324 case MachineRepresentation::kTagged: // Fall through.
322 case MachineRepresentation::kWord32: 325 case MachineRepresentation::kWord32:
323 opcode = kIA32Movl; 326 opcode = kIA32Movl;
324 break; 327 break;
325 case MachineRepresentation::kWord64: // Fall through. 328 case MachineRepresentation::kWord64: // Fall through.
326 case MachineRepresentation::kSimd128: // Fall through. 329 case MachineRepresentation::kSimd128: // Fall through.
330 case MachineRepresentation::kSimd1x4: // Fall through.
331 case MachineRepresentation::kSimd1x8: // Fall through.
332 case MachineRepresentation::kSimd1x16: // Fall through.
327 case MachineRepresentation::kNone: 333 case MachineRepresentation::kNone:
328 UNREACHABLE(); 334 UNREACHABLE();
329 return; 335 return;
330 } 336 }
331 337
332 InstructionOperand val; 338 InstructionOperand val;
333 if (g.CanBeImmediate(value)) { 339 if (g.CanBeImmediate(value)) {
334 val = g.UseImmediate(value); 340 val = g.UseImmediate(value);
335 } else if (rep == MachineRepresentation::kWord8 || 341 } else if (rep == MachineRepresentation::kWord8 ||
336 rep == MachineRepresentation::kBit) { 342 rep == MachineRepresentation::kBit) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 break; 390 break;
385 case MachineRepresentation::kFloat64: 391 case MachineRepresentation::kFloat64:
386 opcode = kCheckedLoadFloat64; 392 opcode = kCheckedLoadFloat64;
387 break; 393 break;
388 case MachineRepresentation::kBit: // Fall through. 394 case MachineRepresentation::kBit: // Fall through.
389 case MachineRepresentation::kTaggedSigned: // Fall through. 395 case MachineRepresentation::kTaggedSigned: // Fall through.
390 case MachineRepresentation::kTaggedPointer: // Fall through. 396 case MachineRepresentation::kTaggedPointer: // Fall through.
391 case MachineRepresentation::kTagged: // Fall through. 397 case MachineRepresentation::kTagged: // Fall through.
392 case MachineRepresentation::kWord64: // Fall through. 398 case MachineRepresentation::kWord64: // Fall through.
393 case MachineRepresentation::kSimd128: // Fall through. 399 case MachineRepresentation::kSimd128: // Fall through.
400 case MachineRepresentation::kSimd1x4: // Fall through.
401 case MachineRepresentation::kSimd1x8: // Fall through.
402 case MachineRepresentation::kSimd1x16: // Fall through.
394 case MachineRepresentation::kNone: 403 case MachineRepresentation::kNone:
395 UNREACHABLE(); 404 UNREACHABLE();
396 return; 405 return;
397 } 406 }
398 if (offset->opcode() == IrOpcode::kInt32Add && CanCover(node, offset)) { 407 if (offset->opcode() == IrOpcode::kInt32Add && CanCover(node, offset)) {
399 Int32BinopMatcher moffset(offset); 408 Int32BinopMatcher moffset(offset);
400 InstructionOperand buffer_operand = g.CanBeImmediate(buffer) 409 InstructionOperand buffer_operand = g.CanBeImmediate(buffer)
401 ? g.UseImmediate(buffer) 410 ? g.UseImmediate(buffer)
402 : g.UseRegister(buffer); 411 : g.UseRegister(buffer);
403 Int32Matcher mlength(length); 412 Int32Matcher mlength(length);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 break; 466 break;
458 case MachineRepresentation::kFloat64: 467 case MachineRepresentation::kFloat64:
459 opcode = kCheckedStoreFloat64; 468 opcode = kCheckedStoreFloat64;
460 break; 469 break;
461 case MachineRepresentation::kBit: // Fall through. 470 case MachineRepresentation::kBit: // Fall through.
462 case MachineRepresentation::kTaggedSigned: // Fall through. 471 case MachineRepresentation::kTaggedSigned: // Fall through.
463 case MachineRepresentation::kTaggedPointer: // Fall through. 472 case MachineRepresentation::kTaggedPointer: // Fall through.
464 case MachineRepresentation::kTagged: // Fall through. 473 case MachineRepresentation::kTagged: // Fall through.
465 case MachineRepresentation::kWord64: // Fall through. 474 case MachineRepresentation::kWord64: // Fall through.
466 case MachineRepresentation::kSimd128: // Fall through. 475 case MachineRepresentation::kSimd128: // Fall through.
476 case MachineRepresentation::kSimd1x4: // Fall through.
477 case MachineRepresentation::kSimd1x8: // Fall through.
478 case MachineRepresentation::kSimd1x16: // Fall through.
467 case MachineRepresentation::kNone: 479 case MachineRepresentation::kNone:
468 UNREACHABLE(); 480 UNREACHABLE();
469 return; 481 return;
470 } 482 }
471 InstructionOperand value_operand = 483 InstructionOperand value_operand =
472 g.CanBeImmediate(value) ? g.UseImmediate(value) 484 g.CanBeImmediate(value) ? g.UseImmediate(value)
473 : ((rep == MachineRepresentation::kWord8 || 485 : ((rep == MachineRepresentation::kWord8 ||
474 rep == MachineRepresentation::kBit) 486 rep == MachineRepresentation::kBit)
475 ? g.UseByteRegister(value) 487 ? g.UseByteRegister(value)
476 : g.UseRegister(value)); 488 : g.UseRegister(value));
(...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1729 // static 1741 // static
1730 MachineOperatorBuilder::AlignmentRequirements 1742 MachineOperatorBuilder::AlignmentRequirements
1731 InstructionSelector::AlignmentRequirements() { 1743 InstructionSelector::AlignmentRequirements() {
1732 return MachineOperatorBuilder::AlignmentRequirements:: 1744 return MachineOperatorBuilder::AlignmentRequirements::
1733 FullUnalignedAccessSupport(); 1745 FullUnalignedAccessSupport();
1734 } 1746 }
1735 1747
1736 } // namespace compiler 1748 } // namespace compiler
1737 } // namespace internal 1749 } // namespace internal
1738 } // namespace v8 1750 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm64/instruction-selector-arm64.cc ('k') | src/compiler/instruction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698