Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(428)

Side by Side Diff: src/compiler/arm/instruction-selector-arm.cc

Issue 2719483002: [V8] Rename SIMD Create methods and add initialization operators. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/base/bits.h" 6 #include "src/base/bits.h"
7 #include "src/compiler/instruction-selector-impl.h" 7 #include "src/compiler/instruction-selector-impl.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 10
(...skipping 2174 matching lines...) Expand 10 before | Expand all | Expand 10 after
2185 V(Float32x4) \ 2185 V(Float32x4) \
2186 V(Int32x4) \ 2186 V(Int32x4) \
2187 V(Int16x8) \ 2187 V(Int16x8) \
2188 V(Int8x16) 2188 V(Int8x16)
2189 2189
2190 #define SIMD_FORMAT_LIST(V) \ 2190 #define SIMD_FORMAT_LIST(V) \
2191 V(32x4) \ 2191 V(32x4) \
2192 V(16x8) \ 2192 V(16x8) \
2193 V(8x16) 2193 V(8x16)
2194 2194
2195 #define SIMD_ZERO_OP_LIST(V) \
2196 V(Simd128Zero) \
2197 V(Simd1x4Zero) \
2198 V(Simd1x8Zero) \
2199 V(Simd1x16Zero)
2200
2195 #define SIMD_UNOP_LIST(V) \ 2201 #define SIMD_UNOP_LIST(V) \
2196 V(Float32x4FromInt32x4) \ 2202 V(Float32x4FromInt32x4) \
2197 V(Float32x4FromUint32x4) \ 2203 V(Float32x4FromUint32x4) \
2198 V(Float32x4Abs) \ 2204 V(Float32x4Abs) \
2199 V(Float32x4Neg) \ 2205 V(Float32x4Neg) \
2200 V(Int32x4FromFloat32x4) \ 2206 V(Int32x4FromFloat32x4) \
2201 V(Uint32x4FromFloat32x4) \ 2207 V(Uint32x4FromFloat32x4) \
2202 V(Int32x4Neg) \ 2208 V(Int32x4Neg) \
2203 V(Int16x8Neg) \ 2209 V(Int16x8Neg) \
2204 V(Int8x16Neg) \ 2210 V(Int8x16Neg) \
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
2264 V(Int32x4ShiftLeftByScalar) \ 2270 V(Int32x4ShiftLeftByScalar) \
2265 V(Int32x4ShiftRightByScalar) \ 2271 V(Int32x4ShiftRightByScalar) \
2266 V(Uint32x4ShiftRightByScalar) \ 2272 V(Uint32x4ShiftRightByScalar) \
2267 V(Int16x8ShiftLeftByScalar) \ 2273 V(Int16x8ShiftLeftByScalar) \
2268 V(Int16x8ShiftRightByScalar) \ 2274 V(Int16x8ShiftRightByScalar) \
2269 V(Uint16x8ShiftRightByScalar) \ 2275 V(Uint16x8ShiftRightByScalar) \
2270 V(Int8x16ShiftLeftByScalar) \ 2276 V(Int8x16ShiftLeftByScalar) \
2271 V(Int8x16ShiftRightByScalar) \ 2277 V(Int8x16ShiftRightByScalar) \
2272 V(Uint8x16ShiftRightByScalar) 2278 V(Uint8x16ShiftRightByScalar)
2273 2279
2274 #define SIMD_VISIT_SPLAT(Type) \ 2280 #define SIMD_VISIT_SPLAT(Type) \
2275 void InstructionSelector::VisitCreate##Type(Node* node) { \ 2281 void InstructionSelector::Visit##Type##Splat(Node* node) { \
2276 VisitRR(this, kArm##Type##Splat, node); \ 2282 VisitRR(this, kArm##Type##Splat, node); \
2277 } 2283 }
2278 SIMD_TYPE_LIST(SIMD_VISIT_SPLAT) 2284 SIMD_TYPE_LIST(SIMD_VISIT_SPLAT)
2279 #undef SIMD_VISIT_SPLAT 2285 #undef SIMD_VISIT_SPLAT
2280 2286
2281 #define SIMD_VISIT_EXTRACT_LANE(Type) \ 2287 #define SIMD_VISIT_EXTRACT_LANE(Type) \
2282 void InstructionSelector::Visit##Type##ExtractLane(Node* node) { \ 2288 void InstructionSelector::Visit##Type##ExtractLane(Node* node) { \
2283 VisitRRI(this, kArm##Type##ExtractLane, node); \ 2289 VisitRRI(this, kArm##Type##ExtractLane, node); \
2284 } 2290 }
2285 SIMD_TYPE_LIST(SIMD_VISIT_EXTRACT_LANE) 2291 SIMD_TYPE_LIST(SIMD_VISIT_EXTRACT_LANE)
2286 #undef SIMD_VISIT_EXTRACT_LANE 2292 #undef SIMD_VISIT_EXTRACT_LANE
2287 2293
2288 #define SIMD_VISIT_REPLACE_LANE(Type) \ 2294 #define SIMD_VISIT_REPLACE_LANE(Type) \
2289 void InstructionSelector::Visit##Type##ReplaceLane(Node* node) { \ 2295 void InstructionSelector::Visit##Type##ReplaceLane(Node* node) { \
2290 VisitRRIR(this, kArm##Type##ReplaceLane, node); \ 2296 VisitRRIR(this, kArm##Type##ReplaceLane, node); \
2291 } 2297 }
2292 SIMD_TYPE_LIST(SIMD_VISIT_REPLACE_LANE) 2298 SIMD_TYPE_LIST(SIMD_VISIT_REPLACE_LANE)
2293 #undef SIMD_VISIT_REPLACE_LANE 2299 #undef SIMD_VISIT_REPLACE_LANE
2294 2300
2301 #define SIMD_VISIT_ZERO_OP(Name) \
2302 void InstructionSelector::Visit##Name(Node* node) { \
2303 ArmOperandGenerator g(this); \
2304 Emit(kArmSimd128Zero, g.DefineAsRegister(node), g.DefineAsRegister(node)); \
2305 }
2306 SIMD_ZERO_OP_LIST(SIMD_VISIT_ZERO_OP)
2307 #undef SIMD_VISIT_ZERO_OP
2308
2295 #define SIMD_VISIT_UNOP(Name) \ 2309 #define SIMD_VISIT_UNOP(Name) \
2296 void InstructionSelector::Visit##Name(Node* node) { \ 2310 void InstructionSelector::Visit##Name(Node* node) { \
2297 VisitRR(this, kArm##Name, node); \ 2311 VisitRR(this, kArm##Name, node); \
2298 } 2312 }
2299 SIMD_UNOP_LIST(SIMD_VISIT_UNOP) 2313 SIMD_UNOP_LIST(SIMD_VISIT_UNOP)
2300 #undef SIMD_VISIT_UNOP 2314 #undef SIMD_VISIT_UNOP
2301 2315
2302 #define SIMD_VISIT_BINOP(Name) \ 2316 #define SIMD_VISIT_BINOP(Name) \
2303 void InstructionSelector::Visit##Name(Node* node) { \ 2317 void InstructionSelector::Visit##Name(Node* node) { \
2304 VisitRRR(this, kArm##Name, node); \ 2318 VisitRRR(this, kArm##Name, node); \
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
2353 Vector<MachineType> req_aligned = Vector<MachineType>::New(2); 2367 Vector<MachineType> req_aligned = Vector<MachineType>::New(2);
2354 req_aligned[0] = MachineType::Float32(); 2368 req_aligned[0] = MachineType::Float32();
2355 req_aligned[1] = MachineType::Float64(); 2369 req_aligned[1] = MachineType::Float64();
2356 return MachineOperatorBuilder::AlignmentRequirements:: 2370 return MachineOperatorBuilder::AlignmentRequirements::
2357 SomeUnalignedAccessUnsupported(req_aligned, req_aligned); 2371 SomeUnalignedAccessUnsupported(req_aligned, req_aligned);
2358 } 2372 }
2359 2373
2360 } // namespace compiler 2374 } // namespace compiler
2361 } // namespace internal 2375 } // namespace internal
2362 } // namespace v8 2376 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698