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 #include "src/ppc/frames-ppc.h" | 9 #include "src/ppc/frames-ppc.h" |
10 | 10 |
(...skipping 2105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2116 Emit(opcode | AddressingModeField::encode(kMode_MRR), | 2116 Emit(opcode | AddressingModeField::encode(kMode_MRR), |
2117 0, nullptr, input_count, inputs); | 2117 0, nullptr, input_count, inputs); |
2118 } | 2118 } |
2119 | 2119 |
2120 void InstructionSelector::VisitAtomicExchange(Node* node) { | 2120 void InstructionSelector::VisitAtomicExchange(Node* node) { |
2121 PPCOperandGenerator g(this); | 2121 PPCOperandGenerator g(this); |
2122 Node* base = node->InputAt(0); | 2122 Node* base = node->InputAt(0); |
2123 Node* index = node->InputAt(1); | 2123 Node* index = node->InputAt(1); |
2124 Node* value = node->InputAt(2); | 2124 Node* value = node->InputAt(2); |
2125 ArchOpcode opcode = kArchNop; | 2125 ArchOpcode opcode = kArchNop; |
2126 MachineType type = AtomicExchangeRepresentationOf(node->op()); | 2126 MachineType type = AtomicOpRepresentationOf(node->op()); |
2127 if (type == MachineType::Int8()) { | 2127 if (type == MachineType::Int8()) { |
2128 opcode = kAtomicExchangeInt8; | 2128 opcode = kAtomicExchangeInt8; |
2129 } else if (type == MachineType::Uint8()) { | 2129 } else if (type == MachineType::Uint8()) { |
2130 opcode = kAtomicExchangeUint8; | 2130 opcode = kAtomicExchangeUint8; |
2131 } else if (type == MachineType::Int16()) { | 2131 } else if (type == MachineType::Int16()) { |
2132 opcode = kAtomicExchangeInt16; | 2132 opcode = kAtomicExchangeInt16; |
2133 } else if (type == MachineType::Uint16()) { | 2133 } else if (type == MachineType::Uint16()) { |
2134 opcode = kAtomicExchangeUint16; | 2134 opcode = kAtomicExchangeUint16; |
2135 } else if (type == MachineType::Int32() || type == MachineType::Uint32()) { | 2135 } else if (type == MachineType::Int32() || type == MachineType::Uint32()) { |
2136 opcode = kAtomicExchangeWord32; | 2136 opcode = kAtomicExchangeWord32; |
(...skipping 11 matching lines...) Expand all Loading... |
2148 InstructionOperand outputs[1]; | 2148 InstructionOperand outputs[1]; |
2149 outputs[0] = g.UseUniqueRegister(node); | 2149 outputs[0] = g.UseUniqueRegister(node); |
2150 InstructionCode code = opcode | AddressingModeField::encode(addressing_mode); | 2150 InstructionCode code = opcode | AddressingModeField::encode(addressing_mode); |
2151 Emit(code, 1, outputs, input_count, inputs); | 2151 Emit(code, 1, outputs, input_count, inputs); |
2152 } | 2152 } |
2153 | 2153 |
2154 void InstructionSelector::VisitAtomicCompareExchange(Node* node) { | 2154 void InstructionSelector::VisitAtomicCompareExchange(Node* node) { |
2155 UNIMPLEMENTED(); | 2155 UNIMPLEMENTED(); |
2156 } | 2156 } |
2157 | 2157 |
| 2158 void InstructionSelector::VisitAtomicAdd(Node* node) { UNIMPLEMENTED(); } |
| 2159 |
| 2160 void InstructionSelector::VisitAtomicSub(Node* node) { UNIMPLEMENTED(); } |
| 2161 |
| 2162 void InstructionSelector::VisitAtomicAnd(Node* node) { UNIMPLEMENTED(); } |
| 2163 |
| 2164 void InstructionSelector::VisitAtomicOr(Node* node) { UNIMPLEMENTED(); } |
| 2165 |
| 2166 void InstructionSelector::VisitAtomicXor(Node* node) { UNIMPLEMENTED(); } |
| 2167 |
2158 void InstructionSelector::VisitInt32AbsWithOverflow(Node* node) { | 2168 void InstructionSelector::VisitInt32AbsWithOverflow(Node* node) { |
2159 UNREACHABLE(); | 2169 UNREACHABLE(); |
2160 } | 2170 } |
2161 | 2171 |
2162 void InstructionSelector::VisitInt64AbsWithOverflow(Node* node) { | 2172 void InstructionSelector::VisitInt64AbsWithOverflow(Node* node) { |
2163 UNREACHABLE(); | 2173 UNREACHABLE(); |
2164 } | 2174 } |
2165 | 2175 |
2166 // static | 2176 // static |
2167 MachineOperatorBuilder::Flags | 2177 MachineOperatorBuilder::Flags |
(...skipping 13 matching lines...) Expand all Loading... |
2181 // static | 2191 // static |
2182 MachineOperatorBuilder::AlignmentRequirements | 2192 MachineOperatorBuilder::AlignmentRequirements |
2183 InstructionSelector::AlignmentRequirements() { | 2193 InstructionSelector::AlignmentRequirements() { |
2184 return MachineOperatorBuilder::AlignmentRequirements:: | 2194 return MachineOperatorBuilder::AlignmentRequirements:: |
2185 FullUnalignedAccessSupport(); | 2195 FullUnalignedAccessSupport(); |
2186 } | 2196 } |
2187 | 2197 |
2188 } // namespace compiler | 2198 } // namespace compiler |
2189 } // namespace internal | 2199 } // namespace internal |
2190 } // namespace v8 | 2200 } // namespace v8 |
OLD | NEW |