| 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 <algorithm> | 5 #include <algorithm> |
| 6 | 6 |
| 7 #include "src/base/adapters.h" | 7 #include "src/base/adapters.h" |
| 8 #include "src/compiler/instruction-selector-impl.h" | 8 #include "src/compiler/instruction-selector-impl.h" |
| 9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
| 10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 case MachineRepresentation::kWord32: | 213 case MachineRepresentation::kWord32: |
| 214 opcode = kX64Movl; | 214 opcode = kX64Movl; |
| 215 break; | 215 break; |
| 216 case MachineRepresentation::kTaggedSigned: // Fall through. | 216 case MachineRepresentation::kTaggedSigned: // Fall through. |
| 217 case MachineRepresentation::kTaggedPointer: // Fall through. | 217 case MachineRepresentation::kTaggedPointer: // Fall through. |
| 218 case MachineRepresentation::kTagged: // Fall through. | 218 case MachineRepresentation::kTagged: // Fall through. |
| 219 case MachineRepresentation::kWord64: | 219 case MachineRepresentation::kWord64: |
| 220 opcode = kX64Movq; | 220 opcode = kX64Movq; |
| 221 break; | 221 break; |
| 222 case MachineRepresentation::kSimd128: // Fall through. | 222 case MachineRepresentation::kSimd128: // Fall through. |
| 223 case MachineRepresentation::kSimd1x4: // Fall through. |
| 224 case MachineRepresentation::kSimd1x8: // Fall through. |
| 225 case MachineRepresentation::kSimd1x16: // Fall through. |
| 223 case MachineRepresentation::kNone: | 226 case MachineRepresentation::kNone: |
| 224 UNREACHABLE(); | 227 UNREACHABLE(); |
| 225 break; | 228 break; |
| 226 } | 229 } |
| 227 return opcode; | 230 return opcode; |
| 228 } | 231 } |
| 229 | 232 |
| 230 ArchOpcode GetStoreOpcode(StoreRepresentation store_rep) { | 233 ArchOpcode GetStoreOpcode(StoreRepresentation store_rep) { |
| 231 switch (store_rep.representation()) { | 234 switch (store_rep.representation()) { |
| 232 case MachineRepresentation::kFloat32: | 235 case MachineRepresentation::kFloat32: |
| (...skipping 12 matching lines...) Expand all Loading... |
| 245 case MachineRepresentation::kWord32: | 248 case MachineRepresentation::kWord32: |
| 246 return kX64Movl; | 249 return kX64Movl; |
| 247 break; | 250 break; |
| 248 case MachineRepresentation::kTaggedSigned: // Fall through. | 251 case MachineRepresentation::kTaggedSigned: // Fall through. |
| 249 case MachineRepresentation::kTaggedPointer: // Fall through. | 252 case MachineRepresentation::kTaggedPointer: // Fall through. |
| 250 case MachineRepresentation::kTagged: // Fall through. | 253 case MachineRepresentation::kTagged: // Fall through. |
| 251 case MachineRepresentation::kWord64: | 254 case MachineRepresentation::kWord64: |
| 252 return kX64Movq; | 255 return kX64Movq; |
| 253 break; | 256 break; |
| 254 case MachineRepresentation::kSimd128: // Fall through. | 257 case MachineRepresentation::kSimd128: // Fall through. |
| 258 case MachineRepresentation::kSimd1x4: // Fall through. |
| 259 case MachineRepresentation::kSimd1x8: // Fall through. |
| 260 case MachineRepresentation::kSimd1x16: // Fall through. |
| 255 case MachineRepresentation::kNone: | 261 case MachineRepresentation::kNone: |
| 256 UNREACHABLE(); | 262 UNREACHABLE(); |
| 257 return kArchNop; | 263 return kArchNop; |
| 258 } | 264 } |
| 259 UNREACHABLE(); | 265 UNREACHABLE(); |
| 260 return kArchNop; | 266 return kArchNop; |
| 261 } | 267 } |
| 262 | 268 |
| 263 } // namespace | 269 } // namespace |
| 264 | 270 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 opcode = kCheckedLoadWord64; | 398 opcode = kCheckedLoadWord64; |
| 393 break; | 399 break; |
| 394 case MachineRepresentation::kFloat32: | 400 case MachineRepresentation::kFloat32: |
| 395 opcode = kCheckedLoadFloat32; | 401 opcode = kCheckedLoadFloat32; |
| 396 break; | 402 break; |
| 397 case MachineRepresentation::kFloat64: | 403 case MachineRepresentation::kFloat64: |
| 398 opcode = kCheckedLoadFloat64; | 404 opcode = kCheckedLoadFloat64; |
| 399 break; | 405 break; |
| 400 case MachineRepresentation::kBit: // Fall through. | 406 case MachineRepresentation::kBit: // Fall through. |
| 401 case MachineRepresentation::kSimd128: // Fall through. | 407 case MachineRepresentation::kSimd128: // Fall through. |
| 408 case MachineRepresentation::kSimd1x4: // Fall through. |
| 409 case MachineRepresentation::kSimd1x8: // Fall through. |
| 410 case MachineRepresentation::kSimd1x16: // Fall through. |
| 402 case MachineRepresentation::kTaggedSigned: // Fall through. | 411 case MachineRepresentation::kTaggedSigned: // Fall through. |
| 403 case MachineRepresentation::kTaggedPointer: // Fall through. | 412 case MachineRepresentation::kTaggedPointer: // Fall through. |
| 404 case MachineRepresentation::kTagged: // Fall through. | 413 case MachineRepresentation::kTagged: // Fall through. |
| 405 case MachineRepresentation::kNone: | 414 case MachineRepresentation::kNone: |
| 406 UNREACHABLE(); | 415 UNREACHABLE(); |
| 407 return; | 416 return; |
| 408 } | 417 } |
| 409 if (offset->opcode() == IrOpcode::kInt32Add && CanCover(node, offset)) { | 418 if (offset->opcode() == IrOpcode::kInt32Add && CanCover(node, offset)) { |
| 410 Int32Matcher mlength(length); | 419 Int32Matcher mlength(length); |
| 411 Int32BinopMatcher moffset(offset); | 420 Int32BinopMatcher moffset(offset); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 opcode = kCheckedStoreWord64; | 456 opcode = kCheckedStoreWord64; |
| 448 break; | 457 break; |
| 449 case MachineRepresentation::kFloat32: | 458 case MachineRepresentation::kFloat32: |
| 450 opcode = kCheckedStoreFloat32; | 459 opcode = kCheckedStoreFloat32; |
| 451 break; | 460 break; |
| 452 case MachineRepresentation::kFloat64: | 461 case MachineRepresentation::kFloat64: |
| 453 opcode = kCheckedStoreFloat64; | 462 opcode = kCheckedStoreFloat64; |
| 454 break; | 463 break; |
| 455 case MachineRepresentation::kBit: // Fall through. | 464 case MachineRepresentation::kBit: // Fall through. |
| 456 case MachineRepresentation::kSimd128: // Fall through. | 465 case MachineRepresentation::kSimd128: // Fall through. |
| 466 case MachineRepresentation::kSimd1x4: // Fall through. |
| 467 case MachineRepresentation::kSimd1x8: // Fall through. |
| 468 case MachineRepresentation::kSimd1x16: // Fall through. |
| 457 case MachineRepresentation::kTaggedSigned: // Fall through. | 469 case MachineRepresentation::kTaggedSigned: // Fall through. |
| 458 case MachineRepresentation::kTaggedPointer: // Fall through. | 470 case MachineRepresentation::kTaggedPointer: // Fall through. |
| 459 case MachineRepresentation::kTagged: // Fall through. | 471 case MachineRepresentation::kTagged: // Fall through. |
| 460 case MachineRepresentation::kNone: | 472 case MachineRepresentation::kNone: |
| 461 UNREACHABLE(); | 473 UNREACHABLE(); |
| 462 return; | 474 return; |
| 463 } | 475 } |
| 464 InstructionOperand value_operand = | 476 InstructionOperand value_operand = |
| 465 g.CanBeImmediate(value) ? g.UseImmediate(value) : g.UseRegister(value); | 477 g.CanBeImmediate(value) ? g.UseImmediate(value) : g.UseRegister(value); |
| 466 if (offset->opcode() == IrOpcode::kInt32Add && CanCover(node, offset)) { | 478 if (offset->opcode() == IrOpcode::kInt32Add && CanCover(node, offset)) { |
| (...skipping 1848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2315 // static | 2327 // static |
| 2316 MachineOperatorBuilder::AlignmentRequirements | 2328 MachineOperatorBuilder::AlignmentRequirements |
| 2317 InstructionSelector::AlignmentRequirements() { | 2329 InstructionSelector::AlignmentRequirements() { |
| 2318 return MachineOperatorBuilder::AlignmentRequirements:: | 2330 return MachineOperatorBuilder::AlignmentRequirements:: |
| 2319 FullUnalignedAccessSupport(); | 2331 FullUnalignedAccessSupport(); |
| 2320 } | 2332 } |
| 2321 | 2333 |
| 2322 } // namespace compiler | 2334 } // namespace compiler |
| 2323 } // namespace internal | 2335 } // namespace internal |
| 2324 } // namespace v8 | 2336 } // namespace v8 |
| OLD | NEW |