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

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

Issue 2729943002: [WASM] Implement remaining F32x4 operations for ARM. (Closed)
Patch Set: All FP operations except MinNum, MaxNum, Div, Sqrt. 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 2180 matching lines...) Expand 10 before | Expand all | Expand 10 after
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) \ 2195 #define SIMD_ZERO_OP_LIST(V) \
2196 V(Simd128Zero) \ 2196 V(Simd128Zero) \
2197 V(Simd1x4Zero) \ 2197 V(Simd1x4Zero) \
2198 V(Simd1x8Zero) \ 2198 V(Simd1x8Zero) \
2199 V(Simd1x16Zero) 2199 V(Simd1x16Zero)
2200 2200
2201 #define SIMD_UNOP_LIST(V) \ 2201 #define SIMD_UNOP_LIST(V) \
2202 V(Float32x4FromInt32x4, kArmFloat32x4FromInt32x4) \ 2202 V(Float32x4FromInt32x4, kArmFloat32x4FromInt32x4) \
2203 V(Float32x4FromUint32x4, kArmFloat32x4FromUint32x4) \ 2203 V(Float32x4FromUint32x4, kArmFloat32x4FromUint32x4) \
2204 V(Float32x4Abs, kArmFloat32x4Abs) \ 2204 V(Float32x4Abs, kArmFloat32x4Abs) \
2205 V(Float32x4Neg, kArmFloat32x4Neg) \ 2205 V(Float32x4Neg, kArmFloat32x4Neg) \
2206 V(Int32x4FromFloat32x4, kArmInt32x4FromFloat32x4) \ 2206 V(Float32x4RecipApprox, kArmFloat32x4RecipApprox) \
2207 V(Uint32x4FromFloat32x4, kArmUint32x4FromFloat32x4) \ 2207 V(Float32x4RecipSqrtApprox, kArmFloat32x4RecipSqrtApprox) \
2208 V(Int32x4Neg, kArmInt32x4Neg) \ 2208 V(Int32x4FromFloat32x4, kArmInt32x4FromFloat32x4) \
2209 V(Int16x8Neg, kArmInt16x8Neg) \ 2209 V(Uint32x4FromFloat32x4, kArmUint32x4FromFloat32x4) \
2210 V(Int8x16Neg, kArmInt8x16Neg) \ 2210 V(Int32x4Neg, kArmInt32x4Neg) \
2211 V(Simd128Not, kArmSimd128Not) \ 2211 V(Int16x8Neg, kArmInt16x8Neg) \
2212 V(Simd1x4Not, kArmSimd128Not) \ 2212 V(Int8x16Neg, kArmInt8x16Neg) \
2213 V(Simd1x4AnyTrue, kArmSimd1x4AnyTrue) \ 2213 V(Simd128Not, kArmSimd128Not) \
2214 V(Simd1x4AllTrue, kArmSimd1x4AllTrue) \ 2214 V(Simd1x4Not, kArmSimd128Not) \
2215 V(Simd1x8Not, kArmSimd128Not) \ 2215 V(Simd1x4AnyTrue, kArmSimd1x4AnyTrue) \
2216 V(Simd1x8AnyTrue, kArmSimd1x8AnyTrue) \ 2216 V(Simd1x4AllTrue, kArmSimd1x4AllTrue) \
2217 V(Simd1x8AllTrue, kArmSimd1x8AllTrue) \ 2217 V(Simd1x8Not, kArmSimd128Not) \
2218 V(Simd1x16Not, kArmSimd128Not) \ 2218 V(Simd1x8AnyTrue, kArmSimd1x8AnyTrue) \
2219 V(Simd1x16AnyTrue, kArmSimd1x16AnyTrue) \ 2219 V(Simd1x8AllTrue, kArmSimd1x8AllTrue) \
2220 V(Simd1x16Not, kArmSimd128Not) \
2221 V(Simd1x16AnyTrue, kArmSimd1x16AnyTrue) \
2220 V(Simd1x16AllTrue, kArmSimd1x16AllTrue) 2222 V(Simd1x16AllTrue, kArmSimd1x16AllTrue)
2221 2223
2222 #define SIMD_BINOP_LIST(V) \ 2224 #define SIMD_BINOP_LIST(V) \
2223 V(Float32x4Add, kArmFloat32x4Add) \ 2225 V(Float32x4Add, kArmFloat32x4Add) \
2224 V(Float32x4Sub, kArmFloat32x4Sub) \ 2226 V(Float32x4Sub, kArmFloat32x4Sub) \
2225 V(Float32x4Equal, kArmFloat32x4Equal) \ 2227 V(Float32x4Mul, kArmFloat32x4Mul) \
2226 V(Float32x4NotEqual, kArmFloat32x4NotEqual) \ 2228 V(Float32x4Min, kArmFloat32x4Min) \
2227 V(Int32x4Add, kArmInt32x4Add) \ 2229 V(Float32x4Max, kArmFloat32x4Max) \
2228 V(Int32x4Sub, kArmInt32x4Sub) \ 2230 V(Float32x4RecipRefine, kArmFloat32x4RecipRefine) \
2229 V(Int32x4Mul, kArmInt32x4Mul) \ 2231 V(Float32x4RecipSqrtRefine, kArmFloat32x4RecipSqrtRefine) \
2230 V(Int32x4Min, kArmInt32x4Min) \ 2232 V(Float32x4Equal, kArmFloat32x4Equal) \
2231 V(Int32x4Max, kArmInt32x4Max) \ 2233 V(Float32x4NotEqual, kArmFloat32x4NotEqual) \
2232 V(Int32x4Equal, kArmInt32x4Equal) \ 2234 V(Float32x4LessThan, kArmFloat32x4LessThan) \
2233 V(Int32x4NotEqual, kArmInt32x4NotEqual) \ 2235 V(Float32x4LessThanOrEqual, kArmFloat32x4LessThanOrEqual) \
2234 V(Int32x4GreaterThan, kArmInt32x4GreaterThan) \ 2236 V(Int32x4Add, kArmInt32x4Add) \
2235 V(Int32x4GreaterThanOrEqual, kArmInt32x4GreaterThanOrEqual) \ 2237 V(Int32x4Sub, kArmInt32x4Sub) \
2236 V(Uint32x4Min, kArmUint32x4Min) \ 2238 V(Int32x4Mul, kArmInt32x4Mul) \
2237 V(Uint32x4Max, kArmUint32x4Max) \ 2239 V(Int32x4Min, kArmInt32x4Min) \
2238 V(Uint32x4GreaterThan, kArmUint32x4GreaterThan) \ 2240 V(Int32x4Max, kArmInt32x4Max) \
2239 V(Uint32x4GreaterThanOrEqual, kArmUint32x4GreaterThanOrEqual) \ 2241 V(Int32x4Equal, kArmInt32x4Equal) \
2240 V(Int16x8Add, kArmInt16x8Add) \ 2242 V(Int32x4NotEqual, kArmInt32x4NotEqual) \
2241 V(Int16x8AddSaturate, kArmInt16x8AddSaturate) \ 2243 V(Int32x4LessThan, kArmInt32x4LessThan) \
2242 V(Int16x8Sub, kArmInt16x8Sub) \ 2244 V(Int32x4LessThanOrEqual, kArmInt32x4LessThanOrEqual) \
2243 V(Int16x8SubSaturate, kArmInt16x8SubSaturate) \ 2245 V(Uint32x4Min, kArmUint32x4Min) \
2244 V(Int16x8Mul, kArmInt16x8Mul) \ 2246 V(Uint32x4Max, kArmUint32x4Max) \
2245 V(Int16x8Min, kArmInt16x8Min) \ 2247 V(Uint32x4LessThan, kArmUint32x4LessThan) \
2246 V(Int16x8Max, kArmInt16x8Max) \ 2248 V(Uint32x4LessThanOrEqual, kArmUint32x4LessThanOrEqual) \
2247 V(Int16x8Equal, kArmInt16x8Equal) \ 2249 V(Int16x8Add, kArmInt16x8Add) \
2248 V(Int16x8NotEqual, kArmInt16x8NotEqual) \ 2250 V(Int16x8AddSaturate, kArmInt16x8AddSaturate) \
2249 V(Int16x8GreaterThan, kArmInt16x8GreaterThan) \ 2251 V(Int16x8Sub, kArmInt16x8Sub) \
2250 V(Int16x8GreaterThanOrEqual, kArmInt16x8GreaterThanOrEqual) \ 2252 V(Int16x8SubSaturate, kArmInt16x8SubSaturate) \
2251 V(Uint16x8AddSaturate, kArmUint16x8AddSaturate) \ 2253 V(Int16x8Mul, kArmInt16x8Mul) \
2252 V(Uint16x8SubSaturate, kArmUint16x8SubSaturate) \ 2254 V(Int16x8Min, kArmInt16x8Min) \
2253 V(Uint16x8Min, kArmUint16x8Min) \ 2255 V(Int16x8Max, kArmInt16x8Max) \
2254 V(Uint16x8Max, kArmUint16x8Max) \ 2256 V(Int16x8Equal, kArmInt16x8Equal) \
2255 V(Uint16x8GreaterThan, kArmUint16x8GreaterThan) \ 2257 V(Int16x8NotEqual, kArmInt16x8NotEqual) \
2256 V(Uint16x8GreaterThanOrEqual, kArmUint16x8GreaterThanOrEqual) \ 2258 V(Int16x8LessThan, kArmInt16x8LessThan) \
2257 V(Int8x16Add, kArmInt8x16Add) \ 2259 V(Int16x8LessThanOrEqual, kArmInt16x8LessThanOrEqual) \
2258 V(Int8x16AddSaturate, kArmInt8x16AddSaturate) \ 2260 V(Uint16x8AddSaturate, kArmUint16x8AddSaturate) \
2259 V(Int8x16Sub, kArmInt8x16Sub) \ 2261 V(Uint16x8SubSaturate, kArmUint16x8SubSaturate) \
2260 V(Int8x16SubSaturate, kArmInt8x16SubSaturate) \ 2262 V(Uint16x8Min, kArmUint16x8Min) \
2261 V(Int8x16Mul, kArmInt8x16Mul) \ 2263 V(Uint16x8Max, kArmUint16x8Max) \
2262 V(Int8x16Min, kArmInt8x16Min) \ 2264 V(Uint16x8LessThan, kArmUint16x8LessThan) \
2263 V(Int8x16Max, kArmInt8x16Max) \ 2265 V(Uint16x8LessThanOrEqual, kArmUint16x8LessThanOrEqual) \
2264 V(Int8x16Equal, kArmInt8x16Equal) \ 2266 V(Int8x16Add, kArmInt8x16Add) \
2265 V(Int8x16NotEqual, kArmInt8x16NotEqual) \ 2267 V(Int8x16AddSaturate, kArmInt8x16AddSaturate) \
2266 V(Int8x16GreaterThan, kArmInt8x16GreaterThan) \ 2268 V(Int8x16Sub, kArmInt8x16Sub) \
2267 V(Int8x16GreaterThanOrEqual, kArmInt8x16GreaterThanOrEqual) \ 2269 V(Int8x16SubSaturate, kArmInt8x16SubSaturate) \
2268 V(Uint8x16AddSaturate, kArmUint8x16AddSaturate) \ 2270 V(Int8x16Mul, kArmInt8x16Mul) \
2269 V(Uint8x16SubSaturate, kArmUint8x16SubSaturate) \ 2271 V(Int8x16Min, kArmInt8x16Min) \
2270 V(Uint8x16Min, kArmUint8x16Min) \ 2272 V(Int8x16Max, kArmInt8x16Max) \
2271 V(Uint8x16Max, kArmUint8x16Max) \ 2273 V(Int8x16Equal, kArmInt8x16Equal) \
2272 V(Uint8x16GreaterThan, kArmUint8x16GreaterThan) \ 2274 V(Int8x16NotEqual, kArmInt8x16NotEqual) \
2273 V(Uint8x16GreaterThanOrEqual, kArmUint8x16GreaterThanOrEqual) \ 2275 V(Int8x16LessThan, kArmInt8x16LessThan) \
2274 V(Simd128And, kArmSimd128And) \ 2276 V(Int8x16LessThanOrEqual, kArmInt8x16LessThanOrEqual) \
2275 V(Simd128Or, kArmSimd128Or) \ 2277 V(Uint8x16AddSaturate, kArmUint8x16AddSaturate) \
2276 V(Simd128Xor, kArmSimd128Xor) \ 2278 V(Uint8x16SubSaturate, kArmUint8x16SubSaturate) \
2277 V(Simd1x4And, kArmSimd128And) \ 2279 V(Uint8x16Min, kArmUint8x16Min) \
2278 V(Simd1x4Or, kArmSimd128Or) \ 2280 V(Uint8x16Max, kArmUint8x16Max) \
2279 V(Simd1x4Xor, kArmSimd128Xor) \ 2281 V(Uint8x16LessThan, kArmUint8x16LessThan) \
2280 V(Simd1x8And, kArmSimd128And) \ 2282 V(Uint8x16LessThanOrEqual, kArmUint8x16LessThanOrEqual) \
2281 V(Simd1x8Or, kArmSimd128Or) \ 2283 V(Simd128And, kArmSimd128And) \
2282 V(Simd1x8Xor, kArmSimd128Xor) \ 2284 V(Simd128Or, kArmSimd128Or) \
2283 V(Simd1x16And, kArmSimd128And) \ 2285 V(Simd128Xor, kArmSimd128Xor) \
2284 V(Simd1x16Or, kArmSimd128Or) \ 2286 V(Simd1x4And, kArmSimd128And) \
2287 V(Simd1x4Or, kArmSimd128Or) \
2288 V(Simd1x4Xor, kArmSimd128Xor) \
2289 V(Simd1x8And, kArmSimd128And) \
2290 V(Simd1x8Or, kArmSimd128Or) \
2291 V(Simd1x8Xor, kArmSimd128Xor) \
2292 V(Simd1x16And, kArmSimd128And) \
2293 V(Simd1x16Or, kArmSimd128Or) \
2285 V(Simd1x16Xor, kArmSimd128Xor) 2294 V(Simd1x16Xor, kArmSimd128Xor)
2286 2295
2287 #define SIMD_SHIFT_OP_LIST(V) \ 2296 #define SIMD_SHIFT_OP_LIST(V) \
2288 V(Int32x4ShiftLeftByScalar) \ 2297 V(Int32x4ShiftLeftByScalar) \
2289 V(Int32x4ShiftRightByScalar) \ 2298 V(Int32x4ShiftRightByScalar) \
2290 V(Uint32x4ShiftRightByScalar) \ 2299 V(Uint32x4ShiftRightByScalar) \
2291 V(Int16x8ShiftLeftByScalar) \ 2300 V(Int16x8ShiftLeftByScalar) \
2292 V(Int16x8ShiftRightByScalar) \ 2301 V(Int16x8ShiftRightByScalar) \
2293 V(Uint16x8ShiftRightByScalar) \ 2302 V(Uint16x8ShiftRightByScalar) \
2294 V(Int8x16ShiftLeftByScalar) \ 2303 V(Int8x16ShiftLeftByScalar) \
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
2385 Vector<MachineType> req_aligned = Vector<MachineType>::New(2); 2394 Vector<MachineType> req_aligned = Vector<MachineType>::New(2);
2386 req_aligned[0] = MachineType::Float32(); 2395 req_aligned[0] = MachineType::Float32();
2387 req_aligned[1] = MachineType::Float64(); 2396 req_aligned[1] = MachineType::Float64();
2388 return MachineOperatorBuilder::AlignmentRequirements:: 2397 return MachineOperatorBuilder::AlignmentRequirements::
2389 SomeUnalignedAccessUnsupported(req_aligned, req_aligned); 2398 SomeUnalignedAccessUnsupported(req_aligned, req_aligned);
2390 } 2399 }
2391 2400
2392 } // namespace compiler 2401 } // namespace compiler
2393 } // namespace internal 2402 } // namespace internal
2394 } // namespace v8 2403 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698