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

Side by Side Diff: src/compiler/x87/instruction-selector-x87.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/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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 opcode = load_rep.IsSigned() ? kX87Movsxwl : kX87Movzxwl; 188 opcode = load_rep.IsSigned() ? kX87Movsxwl : kX87Movzxwl;
189 break; 189 break;
190 case MachineRepresentation::kTaggedSigned: // Fall through. 190 case MachineRepresentation::kTaggedSigned: // Fall through.
191 case MachineRepresentation::kTaggedPointer: // Fall through. 191 case MachineRepresentation::kTaggedPointer: // Fall through.
192 case MachineRepresentation::kTagged: // Fall through. 192 case MachineRepresentation::kTagged: // Fall through.
193 case MachineRepresentation::kWord32: 193 case MachineRepresentation::kWord32:
194 opcode = kX87Movl; 194 opcode = kX87Movl;
195 break; 195 break;
196 case MachineRepresentation::kWord64: // Fall through. 196 case MachineRepresentation::kWord64: // Fall through.
197 case MachineRepresentation::kSimd128: // Fall through. 197 case MachineRepresentation::kSimd128: // Fall through.
198 case MachineRepresentation::kSimd1x4: // Fall through.
199 case MachineRepresentation::kSimd1x8: // Fall through.
200 case MachineRepresentation::kSimd1x16: // Fall through.
198 case MachineRepresentation::kNone: 201 case MachineRepresentation::kNone:
199 UNREACHABLE(); 202 UNREACHABLE();
200 return; 203 return;
201 } 204 }
202 205
203 X87OperandGenerator g(this); 206 X87OperandGenerator g(this);
204 InstructionOperand outputs[1]; 207 InstructionOperand outputs[1];
205 outputs[0] = g.DefineAsRegister(node); 208 outputs[0] = g.DefineAsRegister(node);
206 InstructionOperand inputs[3]; 209 InstructionOperand inputs[3];
207 size_t input_count = 0; 210 size_t input_count = 0;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 opcode = kX87Movw; 281 opcode = kX87Movw;
279 break; 282 break;
280 case MachineRepresentation::kTaggedSigned: // Fall through. 283 case MachineRepresentation::kTaggedSigned: // Fall through.
281 case MachineRepresentation::kTaggedPointer: // Fall through. 284 case MachineRepresentation::kTaggedPointer: // Fall through.
282 case MachineRepresentation::kTagged: // Fall through. 285 case MachineRepresentation::kTagged: // Fall through.
283 case MachineRepresentation::kWord32: 286 case MachineRepresentation::kWord32:
284 opcode = kX87Movl; 287 opcode = kX87Movl;
285 break; 288 break;
286 case MachineRepresentation::kWord64: // Fall through. 289 case MachineRepresentation::kWord64: // Fall through.
287 case MachineRepresentation::kSimd128: // Fall through. 290 case MachineRepresentation::kSimd128: // Fall through.
291 case MachineRepresentation::kSimd1x4: // Fall through.
292 case MachineRepresentation::kSimd1x8: // Fall through.
293 case MachineRepresentation::kSimd1x16: // Fall through.
288 case MachineRepresentation::kNone: 294 case MachineRepresentation::kNone:
289 UNREACHABLE(); 295 UNREACHABLE();
290 return; 296 return;
291 } 297 }
292 298
293 InstructionOperand val; 299 InstructionOperand val;
294 if (g.CanBeImmediate(value)) { 300 if (g.CanBeImmediate(value)) {
295 val = g.UseImmediate(value); 301 val = g.UseImmediate(value);
296 } else if (rep == MachineRepresentation::kWord8 || 302 } else if (rep == MachineRepresentation::kWord8 ||
297 rep == MachineRepresentation::kBit) { 303 rep == MachineRepresentation::kBit) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 break; 351 break;
346 case MachineRepresentation::kFloat64: 352 case MachineRepresentation::kFloat64:
347 opcode = kCheckedLoadFloat64; 353 opcode = kCheckedLoadFloat64;
348 break; 354 break;
349 case MachineRepresentation::kBit: // Fall through. 355 case MachineRepresentation::kBit: // Fall through.
350 case MachineRepresentation::kTaggedSigned: // Fall through. 356 case MachineRepresentation::kTaggedSigned: // Fall through.
351 case MachineRepresentation::kTaggedPointer: // Fall through. 357 case MachineRepresentation::kTaggedPointer: // Fall through.
352 case MachineRepresentation::kTagged: // Fall through. 358 case MachineRepresentation::kTagged: // Fall through.
353 case MachineRepresentation::kWord64: // Fall through. 359 case MachineRepresentation::kWord64: // Fall through.
354 case MachineRepresentation::kSimd128: // Fall through. 360 case MachineRepresentation::kSimd128: // Fall through.
361 case MachineRepresentation::kSimd1x4: // Fall through.
362 case MachineRepresentation::kSimd1x8: // Fall through.
363 case MachineRepresentation::kSimd1x16: // Fall through.
355 case MachineRepresentation::kNone: 364 case MachineRepresentation::kNone:
356 UNREACHABLE(); 365 UNREACHABLE();
357 return; 366 return;
358 } 367 }
359 InstructionOperand offset_operand = g.UseRegister(offset); 368 InstructionOperand offset_operand = g.UseRegister(offset);
360 InstructionOperand length_operand = 369 InstructionOperand length_operand =
361 g.CanBeImmediate(length) ? g.UseImmediate(length) : g.UseRegister(length); 370 g.CanBeImmediate(length) ? g.UseImmediate(length) : g.UseRegister(length);
362 if (g.CanBeImmediate(buffer)) { 371 if (g.CanBeImmediate(buffer)) {
363 Emit(opcode | AddressingModeField::encode(kMode_MRI), 372 Emit(opcode | AddressingModeField::encode(kMode_MRI),
364 g.DefineAsRegister(node), offset_operand, length_operand, 373 g.DefineAsRegister(node), offset_operand, length_operand,
(...skipping 29 matching lines...) Expand all
394 break; 403 break;
395 case MachineRepresentation::kFloat64: 404 case MachineRepresentation::kFloat64:
396 opcode = kCheckedStoreFloat64; 405 opcode = kCheckedStoreFloat64;
397 break; 406 break;
398 case MachineRepresentation::kBit: // Fall through. 407 case MachineRepresentation::kBit: // Fall through.
399 case MachineRepresentation::kTaggedSigned: // Fall through. 408 case MachineRepresentation::kTaggedSigned: // Fall through.
400 case MachineRepresentation::kTaggedPointer: // Fall through. 409 case MachineRepresentation::kTaggedPointer: // Fall through.
401 case MachineRepresentation::kTagged: // Fall through. 410 case MachineRepresentation::kTagged: // Fall through.
402 case MachineRepresentation::kWord64: // Fall through. 411 case MachineRepresentation::kWord64: // Fall through.
403 case MachineRepresentation::kSimd128: // Fall through. 412 case MachineRepresentation::kSimd128: // Fall through.
413 case MachineRepresentation::kSimd1x4: // Fall through.
414 case MachineRepresentation::kSimd1x8: // Fall through.
415 case MachineRepresentation::kSimd1x16: // Fall through.
404 case MachineRepresentation::kNone: 416 case MachineRepresentation::kNone:
405 UNREACHABLE(); 417 UNREACHABLE();
406 return; 418 return;
407 } 419 }
408 InstructionOperand value_operand = 420 InstructionOperand value_operand =
409 g.CanBeImmediate(value) ? g.UseImmediate(value) 421 g.CanBeImmediate(value) ? g.UseImmediate(value)
410 : ((rep == MachineRepresentation::kWord8 || 422 : ((rep == MachineRepresentation::kWord8 ||
411 rep == MachineRepresentation::kBit) 423 rep == MachineRepresentation::kBit)
412 ? g.UseByteRegister(value) 424 ? g.UseByteRegister(value)
413 : g.UseRegister(value)); 425 : g.UseRegister(value));
(...skipping 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after
1844 // static 1856 // static
1845 MachineOperatorBuilder::AlignmentRequirements 1857 MachineOperatorBuilder::AlignmentRequirements
1846 InstructionSelector::AlignmentRequirements() { 1858 InstructionSelector::AlignmentRequirements() {
1847 return MachineOperatorBuilder::AlignmentRequirements:: 1859 return MachineOperatorBuilder::AlignmentRequirements::
1848 FullUnalignedAccessSupport(); 1860 FullUnalignedAccessSupport();
1849 } 1861 }
1850 1862
1851 } // namespace compiler 1863 } // namespace compiler
1852 } // namespace internal 1864 } // namespace internal
1853 } // namespace v8 1865 } // 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