OLD | NEW |
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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 case MachineRepresentation::kFloat64: | 180 case MachineRepresentation::kFloat64: |
181 opcode = kX87Movsd; | 181 opcode = kX87Movsd; |
182 break; | 182 break; |
183 case MachineRepresentation::kBit: // Fall through. | 183 case MachineRepresentation::kBit: // Fall through. |
184 case MachineRepresentation::kWord8: | 184 case MachineRepresentation::kWord8: |
185 opcode = load_rep.IsSigned() ? kX87Movsxbl : kX87Movzxbl; | 185 opcode = load_rep.IsSigned() ? kX87Movsxbl : kX87Movzxbl; |
186 break; | 186 break; |
187 case MachineRepresentation::kWord16: | 187 case MachineRepresentation::kWord16: |
188 opcode = load_rep.IsSigned() ? kX87Movsxwl : kX87Movzxwl; | 188 opcode = load_rep.IsSigned() ? kX87Movsxwl : kX87Movzxwl; |
189 break; | 189 break; |
190 case MachineRepresentation::kTagged: // Fall through. | 190 case MachineRepresentation::kTaggedSigned: // Fall through. |
| 191 case MachineRepresentation::kTaggedPointer: // Fall through. |
| 192 case MachineRepresentation::kTagged: // Fall through. |
191 case MachineRepresentation::kWord32: | 193 case MachineRepresentation::kWord32: |
192 opcode = kX87Movl; | 194 opcode = kX87Movl; |
193 break; | 195 break; |
194 case MachineRepresentation::kWord64: // Fall through. | 196 case MachineRepresentation::kWord64: // Fall through. |
195 case MachineRepresentation::kSimd128: // Fall through. | 197 case MachineRepresentation::kSimd128: // Fall through. |
196 case MachineRepresentation::kNone: | 198 case MachineRepresentation::kNone: |
197 UNREACHABLE(); | 199 UNREACHABLE(); |
198 return; | 200 return; |
199 } | 201 } |
200 | 202 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 case MachineRepresentation::kFloat64: | 266 case MachineRepresentation::kFloat64: |
265 opcode = kX87Movsd; | 267 opcode = kX87Movsd; |
266 break; | 268 break; |
267 case MachineRepresentation::kBit: // Fall through. | 269 case MachineRepresentation::kBit: // Fall through. |
268 case MachineRepresentation::kWord8: | 270 case MachineRepresentation::kWord8: |
269 opcode = kX87Movb; | 271 opcode = kX87Movb; |
270 break; | 272 break; |
271 case MachineRepresentation::kWord16: | 273 case MachineRepresentation::kWord16: |
272 opcode = kX87Movw; | 274 opcode = kX87Movw; |
273 break; | 275 break; |
274 case MachineRepresentation::kTagged: // Fall through. | 276 case MachineRepresentation::kTaggedSigned: // Fall through. |
| 277 case MachineRepresentation::kTaggedPointer: // Fall through. |
| 278 case MachineRepresentation::kTagged: // Fall through. |
275 case MachineRepresentation::kWord32: | 279 case MachineRepresentation::kWord32: |
276 opcode = kX87Movl; | 280 opcode = kX87Movl; |
277 break; | 281 break; |
278 case MachineRepresentation::kWord64: // Fall through. | 282 case MachineRepresentation::kWord64: // Fall through. |
279 case MachineRepresentation::kSimd128: // Fall through. | 283 case MachineRepresentation::kSimd128: // Fall through. |
280 case MachineRepresentation::kNone: | 284 case MachineRepresentation::kNone: |
281 UNREACHABLE(); | 285 UNREACHABLE(); |
282 return; | 286 return; |
283 } | 287 } |
284 | 288 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 break; | 330 break; |
327 case MachineRepresentation::kWord32: | 331 case MachineRepresentation::kWord32: |
328 opcode = kCheckedLoadWord32; | 332 opcode = kCheckedLoadWord32; |
329 break; | 333 break; |
330 case MachineRepresentation::kFloat32: | 334 case MachineRepresentation::kFloat32: |
331 opcode = kCheckedLoadFloat32; | 335 opcode = kCheckedLoadFloat32; |
332 break; | 336 break; |
333 case MachineRepresentation::kFloat64: | 337 case MachineRepresentation::kFloat64: |
334 opcode = kCheckedLoadFloat64; | 338 opcode = kCheckedLoadFloat64; |
335 break; | 339 break; |
336 case MachineRepresentation::kBit: // Fall through. | 340 case MachineRepresentation::kBit: // Fall through. |
337 case MachineRepresentation::kTagged: // Fall through. | 341 case MachineRepresentation::kTaggedSigned: // Fall through. |
338 case MachineRepresentation::kWord64: // Fall through. | 342 case MachineRepresentation::kTaggedPointer: // Fall through. |
339 case MachineRepresentation::kSimd128: // Fall through. | 343 case MachineRepresentation::kTagged: // Fall through. |
| 344 case MachineRepresentation::kWord64: // Fall through. |
| 345 case MachineRepresentation::kSimd128: // Fall through. |
340 case MachineRepresentation::kNone: | 346 case MachineRepresentation::kNone: |
341 UNREACHABLE(); | 347 UNREACHABLE(); |
342 return; | 348 return; |
343 } | 349 } |
344 InstructionOperand offset_operand = g.UseRegister(offset); | 350 InstructionOperand offset_operand = g.UseRegister(offset); |
345 InstructionOperand length_operand = | 351 InstructionOperand length_operand = |
346 g.CanBeImmediate(length) ? g.UseImmediate(length) : g.UseRegister(length); | 352 g.CanBeImmediate(length) ? g.UseImmediate(length) : g.UseRegister(length); |
347 if (g.CanBeImmediate(buffer)) { | 353 if (g.CanBeImmediate(buffer)) { |
348 Emit(opcode | AddressingModeField::encode(kMode_MRI), | 354 Emit(opcode | AddressingModeField::encode(kMode_MRI), |
349 g.DefineAsRegister(node), offset_operand, length_operand, | 355 g.DefineAsRegister(node), offset_operand, length_operand, |
(...skipping 23 matching lines...) Expand all Loading... |
373 break; | 379 break; |
374 case MachineRepresentation::kWord32: | 380 case MachineRepresentation::kWord32: |
375 opcode = kCheckedStoreWord32; | 381 opcode = kCheckedStoreWord32; |
376 break; | 382 break; |
377 case MachineRepresentation::kFloat32: | 383 case MachineRepresentation::kFloat32: |
378 opcode = kCheckedStoreFloat32; | 384 opcode = kCheckedStoreFloat32; |
379 break; | 385 break; |
380 case MachineRepresentation::kFloat64: | 386 case MachineRepresentation::kFloat64: |
381 opcode = kCheckedStoreFloat64; | 387 opcode = kCheckedStoreFloat64; |
382 break; | 388 break; |
383 case MachineRepresentation::kBit: // Fall through. | 389 case MachineRepresentation::kBit: // Fall through. |
384 case MachineRepresentation::kTagged: // Fall through. | 390 case MachineRepresentation::kTaggedSigned: // Fall through. |
385 case MachineRepresentation::kWord64: // Fall through. | 391 case MachineRepresentation::kTaggedPointer: // Fall through. |
386 case MachineRepresentation::kSimd128: // Fall through. | 392 case MachineRepresentation::kTagged: // Fall through. |
| 393 case MachineRepresentation::kWord64: // Fall through. |
| 394 case MachineRepresentation::kSimd128: // Fall through. |
387 case MachineRepresentation::kNone: | 395 case MachineRepresentation::kNone: |
388 UNREACHABLE(); | 396 UNREACHABLE(); |
389 return; | 397 return; |
390 } | 398 } |
391 InstructionOperand value_operand = | 399 InstructionOperand value_operand = |
392 g.CanBeImmediate(value) ? g.UseImmediate(value) | 400 g.CanBeImmediate(value) ? g.UseImmediate(value) |
393 : ((rep == MachineRepresentation::kWord8 || | 401 : ((rep == MachineRepresentation::kWord8 || |
394 rep == MachineRepresentation::kBit) | 402 rep == MachineRepresentation::kBit) |
395 ? g.UseByteRegister(value) | 403 ? g.UseByteRegister(value) |
396 : g.UseRegister(value)); | 404 : g.UseRegister(value)); |
(...skipping 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1727 // static | 1735 // static |
1728 MachineOperatorBuilder::AlignmentRequirements | 1736 MachineOperatorBuilder::AlignmentRequirements |
1729 InstructionSelector::AlignmentRequirements() { | 1737 InstructionSelector::AlignmentRequirements() { |
1730 return MachineOperatorBuilder::AlignmentRequirements:: | 1738 return MachineOperatorBuilder::AlignmentRequirements:: |
1731 FullUnalignedAccessSupport(); | 1739 FullUnalignedAccessSupport(); |
1732 } | 1740 } |
1733 | 1741 |
1734 } // namespace compiler | 1742 } // namespace compiler |
1735 } // namespace internal | 1743 } // namespace internal |
1736 } // namespace v8 | 1744 } // namespace v8 |
OLD | NEW |