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

Side by Side Diff: src/compiler/ppc/instruction-selector-ppc.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/mips64/instruction-selector-mips64.cc ('k') | src/compiler/register-allocator.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 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 #include "src/ppc/frames-ppc.h" 9 #include "src/ppc/frames-ppc.h"
10 10
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 break; 193 break;
194 #if V8_TARGET_ARCH_PPC64 194 #if V8_TARGET_ARCH_PPC64
195 case MachineRepresentation::kTagged: // Fall through. 195 case MachineRepresentation::kTagged: // Fall through.
196 case MachineRepresentation::kWord64: 196 case MachineRepresentation::kWord64:
197 opcode = kPPC_LoadWord64; 197 opcode = kPPC_LoadWord64;
198 mode = kInt16Imm_4ByteAligned; 198 mode = kInt16Imm_4ByteAligned;
199 break; 199 break;
200 #else 200 #else
201 case MachineRepresentation::kWord64: // Fall through. 201 case MachineRepresentation::kWord64: // Fall through.
202 #endif 202 #endif
203 case MachineRepresentation::kSimd128: // Fall through.
203 case MachineRepresentation::kNone: 204 case MachineRepresentation::kNone:
204 UNREACHABLE(); 205 UNREACHABLE();
205 return; 206 return;
206 } 207 }
207 if (g.CanBeImmediate(offset, mode)) { 208 if (g.CanBeImmediate(offset, mode)) {
208 Emit(opcode | AddressingModeField::encode(kMode_MRI), 209 Emit(opcode | AddressingModeField::encode(kMode_MRI),
209 g.DefineAsRegister(node), g.UseRegister(base), g.UseImmediate(offset)); 210 g.DefineAsRegister(node), g.UseRegister(base), g.UseImmediate(offset));
210 } else if (g.CanBeImmediate(base, mode)) { 211 } else if (g.CanBeImmediate(base, mode)) {
211 Emit(opcode | AddressingModeField::encode(kMode_MRI), 212 Emit(opcode | AddressingModeField::encode(kMode_MRI),
212 g.DefineAsRegister(node), g.UseRegister(offset), g.UseImmediate(base)); 213 g.DefineAsRegister(node), g.UseRegister(offset), g.UseImmediate(base));
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 break; 296 break;
296 #if V8_TARGET_ARCH_PPC64 297 #if V8_TARGET_ARCH_PPC64
297 case MachineRepresentation::kTagged: // Fall through. 298 case MachineRepresentation::kTagged: // Fall through.
298 case MachineRepresentation::kWord64: 299 case MachineRepresentation::kWord64:
299 opcode = kPPC_StoreWord64; 300 opcode = kPPC_StoreWord64;
300 mode = kInt16Imm_4ByteAligned; 301 mode = kInt16Imm_4ByteAligned;
301 break; 302 break;
302 #else 303 #else
303 case MachineRepresentation::kWord64: // Fall through. 304 case MachineRepresentation::kWord64: // Fall through.
304 #endif 305 #endif
306 case MachineRepresentation::kSimd128: // Fall through.
305 case MachineRepresentation::kNone: 307 case MachineRepresentation::kNone:
306 UNREACHABLE(); 308 UNREACHABLE();
307 return; 309 return;
308 } 310 }
309 if (g.CanBeImmediate(offset, mode)) { 311 if (g.CanBeImmediate(offset, mode)) {
310 Emit(opcode | AddressingModeField::encode(kMode_MRI), g.NoOutput(), 312 Emit(opcode | AddressingModeField::encode(kMode_MRI), g.NoOutput(),
311 g.UseRegister(base), g.UseImmediate(offset), g.UseRegister(value)); 313 g.UseRegister(base), g.UseImmediate(offset), g.UseRegister(value));
312 } else if (g.CanBeImmediate(base, mode)) { 314 } else if (g.CanBeImmediate(base, mode)) {
313 Emit(opcode | AddressingModeField::encode(kMode_MRI), g.NoOutput(), 315 Emit(opcode | AddressingModeField::encode(kMode_MRI), g.NoOutput(),
314 g.UseRegister(offset), g.UseImmediate(base), g.UseRegister(value)); 316 g.UseRegister(offset), g.UseImmediate(base), g.UseRegister(value));
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 opcode = kCheckedLoadFloat32; 348 opcode = kCheckedLoadFloat32;
347 break; 349 break;
348 case MachineRepresentation::kFloat64: 350 case MachineRepresentation::kFloat64:
349 opcode = kCheckedLoadFloat64; 351 opcode = kCheckedLoadFloat64;
350 break; 352 break;
351 case MachineRepresentation::kBit: // Fall through. 353 case MachineRepresentation::kBit: // Fall through.
352 case MachineRepresentation::kTagged: // Fall through. 354 case MachineRepresentation::kTagged: // Fall through.
353 #if !V8_TARGET_ARCH_PPC64 355 #if !V8_TARGET_ARCH_PPC64
354 case MachineRepresentation::kWord64: // Fall through. 356 case MachineRepresentation::kWord64: // Fall through.
355 #endif 357 #endif
358 case MachineRepresentation::kSimd128: // Fall through.
356 case MachineRepresentation::kNone: 359 case MachineRepresentation::kNone:
357 UNREACHABLE(); 360 UNREACHABLE();
358 return; 361 return;
359 } 362 }
360 AddressingMode addressingMode = kMode_MRR; 363 AddressingMode addressingMode = kMode_MRR;
361 Emit(opcode | AddressingModeField::encode(addressingMode), 364 Emit(opcode | AddressingModeField::encode(addressingMode),
362 g.DefineAsRegister(node), g.UseRegister(base), g.UseRegister(offset), 365 g.DefineAsRegister(node), g.UseRegister(base), g.UseRegister(offset),
363 g.UseOperand(length, kInt16Imm_Unsigned)); 366 g.UseOperand(length, kInt16Imm_Unsigned));
364 } 367 }
365 368
(...skipping 25 matching lines...) Expand all
391 opcode = kCheckedStoreFloat32; 394 opcode = kCheckedStoreFloat32;
392 break; 395 break;
393 case MachineRepresentation::kFloat64: 396 case MachineRepresentation::kFloat64:
394 opcode = kCheckedStoreFloat64; 397 opcode = kCheckedStoreFloat64;
395 break; 398 break;
396 case MachineRepresentation::kBit: // Fall through. 399 case MachineRepresentation::kBit: // Fall through.
397 case MachineRepresentation::kTagged: // Fall through. 400 case MachineRepresentation::kTagged: // Fall through.
398 #if !V8_TARGET_ARCH_PPC64 401 #if !V8_TARGET_ARCH_PPC64
399 case MachineRepresentation::kWord64: // Fall through. 402 case MachineRepresentation::kWord64: // Fall through.
400 #endif 403 #endif
404 case MachineRepresentation::kSimd128: // Fall through.
401 case MachineRepresentation::kNone: 405 case MachineRepresentation::kNone:
402 UNREACHABLE(); 406 UNREACHABLE();
403 return; 407 return;
404 } 408 }
405 AddressingMode addressingMode = kMode_MRR; 409 AddressingMode addressingMode = kMode_MRR;
406 Emit(opcode | AddressingModeField::encode(addressingMode), g.NoOutput(), 410 Emit(opcode | AddressingModeField::encode(addressingMode), g.NoOutput(),
407 g.UseRegister(base), g.UseRegister(offset), 411 g.UseRegister(base), g.UseRegister(offset),
408 g.UseOperand(length, kInt16Imm_Unsigned), g.UseRegister(value)); 412 g.UseOperand(length, kInt16Imm_Unsigned), g.UseRegister(value));
409 } 413 }
410 414
(...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after
1804 MachineOperatorBuilder::kFloat64RoundTruncate | 1808 MachineOperatorBuilder::kFloat64RoundTruncate |
1805 MachineOperatorBuilder::kFloat64RoundTiesAway | 1809 MachineOperatorBuilder::kFloat64RoundTiesAway |
1806 MachineOperatorBuilder::kWord32Popcnt | 1810 MachineOperatorBuilder::kWord32Popcnt |
1807 MachineOperatorBuilder::kWord64Popcnt; 1811 MachineOperatorBuilder::kWord64Popcnt;
1808 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. 1812 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f.
1809 } 1813 }
1810 1814
1811 } // namespace compiler 1815 } // namespace compiler
1812 } // namespace internal 1816 } // namespace internal
1813 } // namespace v8 1817 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips64/instruction-selector-mips64.cc ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698