| 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 case MachineRepresentation::kFloat64: | 219 case MachineRepresentation::kFloat64: |
| 220 opcode = kIA32Movsd; | 220 opcode = kIA32Movsd; |
| 221 break; | 221 break; |
| 222 case MachineRepresentation::kBit: // Fall through. | 222 case MachineRepresentation::kBit: // Fall through. |
| 223 case MachineRepresentation::kWord8: | 223 case MachineRepresentation::kWord8: |
| 224 opcode = load_rep.IsSigned() ? kIA32Movsxbl : kIA32Movzxbl; | 224 opcode = load_rep.IsSigned() ? kIA32Movsxbl : kIA32Movzxbl; |
| 225 break; | 225 break; |
| 226 case MachineRepresentation::kWord16: | 226 case MachineRepresentation::kWord16: |
| 227 opcode = load_rep.IsSigned() ? kIA32Movsxwl : kIA32Movzxwl; | 227 opcode = load_rep.IsSigned() ? kIA32Movsxwl : kIA32Movzxwl; |
| 228 break; | 228 break; |
| 229 case MachineRepresentation::kTagged: // Fall through. | 229 case MachineRepresentation::kTaggedSigned: // Fall through. |
| 230 case MachineRepresentation::kTaggedPointer: // Fall through. |
| 231 case MachineRepresentation::kTagged: // Fall through. |
| 230 case MachineRepresentation::kWord32: | 232 case MachineRepresentation::kWord32: |
| 231 opcode = kIA32Movl; | 233 opcode = kIA32Movl; |
| 232 break; | 234 break; |
| 233 case MachineRepresentation::kWord64: // Fall through. | 235 case MachineRepresentation::kWord64: // Fall through. |
| 234 case MachineRepresentation::kSimd128: // Fall through. | 236 case MachineRepresentation::kSimd128: // Fall through. |
| 235 case MachineRepresentation::kNone: | 237 case MachineRepresentation::kNone: |
| 236 UNREACHABLE(); | 238 UNREACHABLE(); |
| 237 return; | 239 return; |
| 238 } | 240 } |
| 239 | 241 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 case MachineRepresentation::kFloat64: | 305 case MachineRepresentation::kFloat64: |
| 304 opcode = kIA32Movsd; | 306 opcode = kIA32Movsd; |
| 305 break; | 307 break; |
| 306 case MachineRepresentation::kBit: // Fall through. | 308 case MachineRepresentation::kBit: // Fall through. |
| 307 case MachineRepresentation::kWord8: | 309 case MachineRepresentation::kWord8: |
| 308 opcode = kIA32Movb; | 310 opcode = kIA32Movb; |
| 309 break; | 311 break; |
| 310 case MachineRepresentation::kWord16: | 312 case MachineRepresentation::kWord16: |
| 311 opcode = kIA32Movw; | 313 opcode = kIA32Movw; |
| 312 break; | 314 break; |
| 313 case MachineRepresentation::kTagged: // Fall through. | 315 case MachineRepresentation::kTaggedSigned: // Fall through. |
| 316 case MachineRepresentation::kTaggedPointer: // Fall through. |
| 317 case MachineRepresentation::kTagged: // Fall through. |
| 314 case MachineRepresentation::kWord32: | 318 case MachineRepresentation::kWord32: |
| 315 opcode = kIA32Movl; | 319 opcode = kIA32Movl; |
| 316 break; | 320 break; |
| 317 case MachineRepresentation::kWord64: // Fall through. | 321 case MachineRepresentation::kWord64: // Fall through. |
| 318 case MachineRepresentation::kSimd128: // Fall through. | 322 case MachineRepresentation::kSimd128: // Fall through. |
| 319 case MachineRepresentation::kNone: | 323 case MachineRepresentation::kNone: |
| 320 UNREACHABLE(); | 324 UNREACHABLE(); |
| 321 return; | 325 return; |
| 322 } | 326 } |
| 323 | 327 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 break; | 369 break; |
| 366 case MachineRepresentation::kWord32: | 370 case MachineRepresentation::kWord32: |
| 367 opcode = kCheckedLoadWord32; | 371 opcode = kCheckedLoadWord32; |
| 368 break; | 372 break; |
| 369 case MachineRepresentation::kFloat32: | 373 case MachineRepresentation::kFloat32: |
| 370 opcode = kCheckedLoadFloat32; | 374 opcode = kCheckedLoadFloat32; |
| 371 break; | 375 break; |
| 372 case MachineRepresentation::kFloat64: | 376 case MachineRepresentation::kFloat64: |
| 373 opcode = kCheckedLoadFloat64; | 377 opcode = kCheckedLoadFloat64; |
| 374 break; | 378 break; |
| 375 case MachineRepresentation::kBit: // Fall through. | 379 case MachineRepresentation::kBit: // Fall through. |
| 376 case MachineRepresentation::kTagged: // Fall through. | 380 case MachineRepresentation::kTaggedSigned: // Fall through. |
| 377 case MachineRepresentation::kWord64: // Fall through. | 381 case MachineRepresentation::kTaggedPointer: // Fall through. |
| 378 case MachineRepresentation::kSimd128: // Fall through. | 382 case MachineRepresentation::kTagged: // Fall through. |
| 383 case MachineRepresentation::kWord64: // Fall through. |
| 384 case MachineRepresentation::kSimd128: // Fall through. |
| 379 case MachineRepresentation::kNone: | 385 case MachineRepresentation::kNone: |
| 380 UNREACHABLE(); | 386 UNREACHABLE(); |
| 381 return; | 387 return; |
| 382 } | 388 } |
| 383 InstructionOperand offset_operand = g.UseRegister(offset); | 389 InstructionOperand offset_operand = g.UseRegister(offset); |
| 384 InstructionOperand length_operand = | 390 InstructionOperand length_operand = |
| 385 g.CanBeImmediate(length) ? g.UseImmediate(length) : g.UseRegister(length); | 391 g.CanBeImmediate(length) ? g.UseImmediate(length) : g.UseRegister(length); |
| 386 if (g.CanBeImmediate(buffer)) { | 392 if (g.CanBeImmediate(buffer)) { |
| 387 Emit(opcode | AddressingModeField::encode(kMode_MRI), | 393 Emit(opcode | AddressingModeField::encode(kMode_MRI), |
| 388 g.DefineAsRegister(node), offset_operand, length_operand, | 394 g.DefineAsRegister(node), offset_operand, length_operand, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 412 break; | 418 break; |
| 413 case MachineRepresentation::kWord32: | 419 case MachineRepresentation::kWord32: |
| 414 opcode = kCheckedStoreWord32; | 420 opcode = kCheckedStoreWord32; |
| 415 break; | 421 break; |
| 416 case MachineRepresentation::kFloat32: | 422 case MachineRepresentation::kFloat32: |
| 417 opcode = kCheckedStoreFloat32; | 423 opcode = kCheckedStoreFloat32; |
| 418 break; | 424 break; |
| 419 case MachineRepresentation::kFloat64: | 425 case MachineRepresentation::kFloat64: |
| 420 opcode = kCheckedStoreFloat64; | 426 opcode = kCheckedStoreFloat64; |
| 421 break; | 427 break; |
| 422 case MachineRepresentation::kBit: // Fall through. | 428 case MachineRepresentation::kBit: // Fall through. |
| 423 case MachineRepresentation::kTagged: // Fall through. | 429 case MachineRepresentation::kTaggedSigned: // Fall through. |
| 424 case MachineRepresentation::kWord64: // Fall through. | 430 case MachineRepresentation::kTaggedPointer: // Fall through. |
| 425 case MachineRepresentation::kSimd128: // Fall through. | 431 case MachineRepresentation::kTagged: // Fall through. |
| 432 case MachineRepresentation::kWord64: // Fall through. |
| 433 case MachineRepresentation::kSimd128: // Fall through. |
| 426 case MachineRepresentation::kNone: | 434 case MachineRepresentation::kNone: |
| 427 UNREACHABLE(); | 435 UNREACHABLE(); |
| 428 return; | 436 return; |
| 429 } | 437 } |
| 430 InstructionOperand value_operand = | 438 InstructionOperand value_operand = |
| 431 g.CanBeImmediate(value) ? g.UseImmediate(value) | 439 g.CanBeImmediate(value) ? g.UseImmediate(value) |
| 432 : ((rep == MachineRepresentation::kWord8 || | 440 : ((rep == MachineRepresentation::kWord8 || |
| 433 rep == MachineRepresentation::kBit) | 441 rep == MachineRepresentation::kBit) |
| 434 ? g.UseByteRegister(value) | 442 ? g.UseByteRegister(value) |
| 435 : g.UseRegister(value)); | 443 : g.UseRegister(value)); |
| (...skipping 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1691 // static | 1699 // static |
| 1692 MachineOperatorBuilder::AlignmentRequirements | 1700 MachineOperatorBuilder::AlignmentRequirements |
| 1693 InstructionSelector::AlignmentRequirements() { | 1701 InstructionSelector::AlignmentRequirements() { |
| 1694 return MachineOperatorBuilder::AlignmentRequirements:: | 1702 return MachineOperatorBuilder::AlignmentRequirements:: |
| 1695 FullUnalignedAccessSupport(); | 1703 FullUnalignedAccessSupport(); |
| 1696 } | 1704 } |
| 1697 | 1705 |
| 1698 } // namespace compiler | 1706 } // namespace compiler |
| 1699 } // namespace internal | 1707 } // namespace internal |
| 1700 } // namespace v8 | 1708 } // namespace v8 |
| OLD | NEW |