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

Side by Side Diff: src/compiler/mips64/instruction-selector-mips64.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
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/base/bits.h" 6 #include "src/base/bits.h"
7 #include "src/compiler/instruction-selector-impl.h" 7 #include "src/compiler/instruction-selector-impl.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 10
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 case MachineRepresentation::kWord16: 152 case MachineRepresentation::kWord16:
153 opcode = load_rep.IsUnsigned() ? kMips64Lhu : kMips64Lh; 153 opcode = load_rep.IsUnsigned() ? kMips64Lhu : kMips64Lh;
154 break; 154 break;
155 case MachineRepresentation::kWord32: 155 case MachineRepresentation::kWord32:
156 opcode = kMips64Lw; 156 opcode = kMips64Lw;
157 break; 157 break;
158 case MachineRepresentation::kTagged: // Fall through. 158 case MachineRepresentation::kTagged: // Fall through.
159 case MachineRepresentation::kWord64: 159 case MachineRepresentation::kWord64:
160 opcode = kMips64Ld; 160 opcode = kMips64Ld;
161 break; 161 break;
162 case MachineRepresentation::kSimd128: // Fall through.
162 case MachineRepresentation::kNone: 163 case MachineRepresentation::kNone:
163 UNREACHABLE(); 164 UNREACHABLE();
164 return; 165 return;
165 } 166 }
166 167
167 if (g.CanBeImmediate(index, opcode)) { 168 if (g.CanBeImmediate(index, opcode)) {
168 Emit(opcode | AddressingModeField::encode(kMode_MRI), 169 Emit(opcode | AddressingModeField::encode(kMode_MRI),
169 g.DefineAsRegister(node), g.UseRegister(base), g.UseImmediate(index)); 170 g.DefineAsRegister(node), g.UseRegister(base), g.UseImmediate(index));
170 } else { 171 } else {
171 InstructionOperand addr_reg = g.TempRegister(); 172 InstructionOperand addr_reg = g.TempRegister();
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 case MachineRepresentation::kWord16: 235 case MachineRepresentation::kWord16:
235 opcode = kMips64Sh; 236 opcode = kMips64Sh;
236 break; 237 break;
237 case MachineRepresentation::kWord32: 238 case MachineRepresentation::kWord32:
238 opcode = kMips64Sw; 239 opcode = kMips64Sw;
239 break; 240 break;
240 case MachineRepresentation::kTagged: // Fall through. 241 case MachineRepresentation::kTagged: // Fall through.
241 case MachineRepresentation::kWord64: 242 case MachineRepresentation::kWord64:
242 opcode = kMips64Sd; 243 opcode = kMips64Sd;
243 break; 244 break;
245 case MachineRepresentation::kSimd128: // Fall through.
244 case MachineRepresentation::kNone: 246 case MachineRepresentation::kNone:
245 UNREACHABLE(); 247 UNREACHABLE();
246 return; 248 return;
247 } 249 }
248 250
249 if (g.CanBeImmediate(index, opcode)) { 251 if (g.CanBeImmediate(index, opcode)) {
250 Emit(opcode | AddressingModeField::encode(kMode_MRI), g.NoOutput(), 252 Emit(opcode | AddressingModeField::encode(kMode_MRI), g.NoOutput(),
251 g.UseRegister(base), g.UseImmediate(index), g.UseRegister(value)); 253 g.UseRegister(base), g.UseImmediate(index), g.UseRegister(value));
252 } else { 254 } else {
253 InstructionOperand addr_reg = g.TempRegister(); 255 InstructionOperand addr_reg = g.TempRegister();
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after
1340 opcode = kCheckedLoadWord64; 1342 opcode = kCheckedLoadWord64;
1341 break; 1343 break;
1342 case MachineRepresentation::kFloat32: 1344 case MachineRepresentation::kFloat32:
1343 opcode = kCheckedLoadFloat32; 1345 opcode = kCheckedLoadFloat32;
1344 break; 1346 break;
1345 case MachineRepresentation::kFloat64: 1347 case MachineRepresentation::kFloat64:
1346 opcode = kCheckedLoadFloat64; 1348 opcode = kCheckedLoadFloat64;
1347 break; 1349 break;
1348 case MachineRepresentation::kBit: 1350 case MachineRepresentation::kBit:
1349 case MachineRepresentation::kTagged: 1351 case MachineRepresentation::kTagged:
1352 case MachineRepresentation::kSimd128:
1350 case MachineRepresentation::kNone: 1353 case MachineRepresentation::kNone:
1351 UNREACHABLE(); 1354 UNREACHABLE();
1352 return; 1355 return;
1353 } 1356 }
1354 InstructionOperand offset_operand = g.CanBeImmediate(offset, opcode) 1357 InstructionOperand offset_operand = g.CanBeImmediate(offset, opcode)
1355 ? g.UseImmediate(offset) 1358 ? g.UseImmediate(offset)
1356 : g.UseRegister(offset); 1359 : g.UseRegister(offset);
1357 1360
1358 InstructionOperand length_operand = (!g.CanBeImmediate(offset, opcode)) 1361 InstructionOperand length_operand = (!g.CanBeImmediate(offset, opcode))
1359 ? g.CanBeImmediate(length, opcode) 1362 ? g.CanBeImmediate(length, opcode)
(...skipping 29 matching lines...) Expand all
1389 opcode = kCheckedStoreWord64; 1392 opcode = kCheckedStoreWord64;
1390 break; 1393 break;
1391 case MachineRepresentation::kFloat32: 1394 case MachineRepresentation::kFloat32:
1392 opcode = kCheckedStoreFloat32; 1395 opcode = kCheckedStoreFloat32;
1393 break; 1396 break;
1394 case MachineRepresentation::kFloat64: 1397 case MachineRepresentation::kFloat64:
1395 opcode = kCheckedStoreFloat64; 1398 opcode = kCheckedStoreFloat64;
1396 break; 1399 break;
1397 case MachineRepresentation::kBit: 1400 case MachineRepresentation::kBit:
1398 case MachineRepresentation::kTagged: 1401 case MachineRepresentation::kTagged:
1402 case MachineRepresentation::kSimd128:
1399 case MachineRepresentation::kNone: 1403 case MachineRepresentation::kNone:
1400 UNREACHABLE(); 1404 UNREACHABLE();
1401 return; 1405 return;
1402 } 1406 }
1403 InstructionOperand offset_operand = g.CanBeImmediate(offset, opcode) 1407 InstructionOperand offset_operand = g.CanBeImmediate(offset, opcode)
1404 ? g.UseImmediate(offset) 1408 ? g.UseImmediate(offset)
1405 : g.UseRegister(offset); 1409 : g.UseRegister(offset);
1406 1410
1407 InstructionOperand length_operand = (!g.CanBeImmediate(offset, opcode)) 1411 InstructionOperand length_operand = (!g.CanBeImmediate(offset, opcode))
1408 ? g.CanBeImmediate(length, opcode) 1412 ? g.CanBeImmediate(length, opcode)
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
1903 MachineOperatorBuilder::kFloat32RoundUp | 1907 MachineOperatorBuilder::kFloat32RoundUp |
1904 MachineOperatorBuilder::kFloat64RoundTruncate | 1908 MachineOperatorBuilder::kFloat64RoundTruncate |
1905 MachineOperatorBuilder::kFloat32RoundTruncate | 1909 MachineOperatorBuilder::kFloat32RoundTruncate |
1906 MachineOperatorBuilder::kFloat64RoundTiesEven | 1910 MachineOperatorBuilder::kFloat64RoundTiesEven |
1907 MachineOperatorBuilder::kFloat32RoundTiesEven; 1911 MachineOperatorBuilder::kFloat32RoundTiesEven;
1908 } 1912 }
1909 1913
1910 } // namespace compiler 1914 } // namespace compiler
1911 } // namespace internal 1915 } // namespace internal
1912 } // namespace v8 1916 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips/instruction-selector-mips.cc ('k') | src/compiler/ppc/instruction-selector-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698