OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/s390/frames-s390.h" | 9 #include "src/s390/frames-s390.h" |
10 | 10 |
(...skipping 2413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2424 Emit(opcode | AddressingModeField::encode(kMode_MRR), 0, nullptr, input_count, | 2424 Emit(opcode | AddressingModeField::encode(kMode_MRR), 0, nullptr, input_count, |
2425 inputs); | 2425 inputs); |
2426 } | 2426 } |
2427 | 2427 |
2428 void InstructionSelector::VisitAtomicExchange(Node* node) { | 2428 void InstructionSelector::VisitAtomicExchange(Node* node) { |
2429 S390OperandGenerator g(this); | 2429 S390OperandGenerator g(this); |
2430 Node* base = node->InputAt(0); | 2430 Node* base = node->InputAt(0); |
2431 Node* index = node->InputAt(1); | 2431 Node* index = node->InputAt(1); |
2432 Node* value = node->InputAt(2); | 2432 Node* value = node->InputAt(2); |
2433 ArchOpcode opcode = kArchNop; | 2433 ArchOpcode opcode = kArchNop; |
2434 MachineType type = AtomicExchangeRepresentationOf(node->op()); | 2434 MachineType type = AtomicOpRepresentationOf(node->op()); |
2435 if (type == MachineType::Int8()) { | 2435 if (type == MachineType::Int8()) { |
2436 opcode = kAtomicExchangeInt8; | 2436 opcode = kAtomicExchangeInt8; |
2437 } else if (type == MachineType::Uint8()) { | 2437 } else if (type == MachineType::Uint8()) { |
2438 opcode = kAtomicExchangeUint8; | 2438 opcode = kAtomicExchangeUint8; |
2439 } else if (type == MachineType::Int16()) { | 2439 } else if (type == MachineType::Int16()) { |
2440 opcode = kAtomicExchangeInt16; | 2440 opcode = kAtomicExchangeInt16; |
2441 } else if (type == MachineType::Uint16()) { | 2441 } else if (type == MachineType::Uint16()) { |
2442 opcode = kAtomicExchangeUint16; | 2442 opcode = kAtomicExchangeUint16; |
2443 } else if (type == MachineType::Int32() || type == MachineType::Uint32()) { | 2443 } else if (type == MachineType::Int32() || type == MachineType::Uint32()) { |
2444 opcode = kAtomicExchangeWord32; | 2444 opcode = kAtomicExchangeWord32; |
(...skipping 11 matching lines...) Expand all Loading... |
2456 InstructionOperand outputs[1]; | 2456 InstructionOperand outputs[1]; |
2457 outputs[0] = g.UseUniqueRegister(node); | 2457 outputs[0] = g.UseUniqueRegister(node); |
2458 InstructionCode code = opcode | AddressingModeField::encode(addressing_mode); | 2458 InstructionCode code = opcode | AddressingModeField::encode(addressing_mode); |
2459 Emit(code, 1, outputs, input_count, inputs); | 2459 Emit(code, 1, outputs, input_count, inputs); |
2460 } | 2460 } |
2461 | 2461 |
2462 void InstructionSelector::VisitAtomicCompareExchange(Node* node) { | 2462 void InstructionSelector::VisitAtomicCompareExchange(Node* node) { |
2463 UNIMPLEMENTED(); | 2463 UNIMPLEMENTED(); |
2464 } | 2464 } |
2465 | 2465 |
| 2466 void InstructionSelector::VisitAtomicAdd(Node* node) { UNIMPLEMENTED(); } |
| 2467 |
| 2468 void InstructionSelector::VisitAtomicSub(Node* node) { UNIMPLEMENTED(); } |
| 2469 |
| 2470 void InstructionSelector::VisitAtomicAnd(Node* node) { UNIMPLEMENTED(); } |
| 2471 |
| 2472 void InstructionSelector::VisitAtomicOr(Node* node) { UNIMPLEMENTED(); } |
| 2473 |
| 2474 void InstructionSelector::VisitAtomicXor(Node* node) { UNIMPLEMENTED(); } |
| 2475 |
2466 // static | 2476 // static |
2467 MachineOperatorBuilder::Flags | 2477 MachineOperatorBuilder::Flags |
2468 InstructionSelector::SupportedMachineOperatorFlags() { | 2478 InstructionSelector::SupportedMachineOperatorFlags() { |
2469 return MachineOperatorBuilder::kFloat32RoundDown | | 2479 return MachineOperatorBuilder::kFloat32RoundDown | |
2470 MachineOperatorBuilder::kFloat64RoundDown | | 2480 MachineOperatorBuilder::kFloat64RoundDown | |
2471 MachineOperatorBuilder::kFloat32RoundUp | | 2481 MachineOperatorBuilder::kFloat32RoundUp | |
2472 MachineOperatorBuilder::kFloat64RoundUp | | 2482 MachineOperatorBuilder::kFloat64RoundUp | |
2473 MachineOperatorBuilder::kFloat32RoundTruncate | | 2483 MachineOperatorBuilder::kFloat32RoundTruncate | |
2474 MachineOperatorBuilder::kFloat64RoundTruncate | | 2484 MachineOperatorBuilder::kFloat64RoundTruncate | |
2475 MachineOperatorBuilder::kFloat64RoundTiesAway | | 2485 MachineOperatorBuilder::kFloat64RoundTiesAway | |
2476 MachineOperatorBuilder::kWord32Popcnt | | 2486 MachineOperatorBuilder::kWord32Popcnt | |
2477 MachineOperatorBuilder::kWord32ReverseBytes | | 2487 MachineOperatorBuilder::kWord32ReverseBytes | |
2478 MachineOperatorBuilder::kWord64ReverseBytes | | 2488 MachineOperatorBuilder::kWord64ReverseBytes | |
2479 MachineOperatorBuilder::kInt32AbsWithOverflow | | 2489 MachineOperatorBuilder::kInt32AbsWithOverflow | |
2480 MachineOperatorBuilder::kInt64AbsWithOverflow | | 2490 MachineOperatorBuilder::kInt64AbsWithOverflow | |
2481 MachineOperatorBuilder::kWord64Popcnt; | 2491 MachineOperatorBuilder::kWord64Popcnt; |
2482 } | 2492 } |
2483 | 2493 |
2484 // static | 2494 // static |
2485 MachineOperatorBuilder::AlignmentRequirements | 2495 MachineOperatorBuilder::AlignmentRequirements |
2486 InstructionSelector::AlignmentRequirements() { | 2496 InstructionSelector::AlignmentRequirements() { |
2487 return MachineOperatorBuilder::AlignmentRequirements:: | 2497 return MachineOperatorBuilder::AlignmentRequirements:: |
2488 FullUnalignedAccessSupport(); | 2498 FullUnalignedAccessSupport(); |
2489 } | 2499 } |
2490 | 2500 |
2491 } // namespace compiler | 2501 } // namespace compiler |
2492 } // namespace internal | 2502 } // namespace internal |
2493 } // namespace v8 | 2503 } // namespace v8 |
OLD | NEW |