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

Side by Side Diff: src/wasm/wasm-opcodes.h

Issue 2454193002: [Turbofan] SIMD tests for Int32x4Add, Sub, ReplaceLane. (Closed)
Patch Set: Pass expected value in to Wasm code. Created 4 years, 1 month 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
« no previous file with comments | « src/wasm/wasm-macro-gen.h ('k') | test/cctest/wasm/test-run-wasm-simd.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef V8_WASM_OPCODES_H_ 5 #ifndef V8_WASM_OPCODES_H_
6 #define V8_WASM_OPCODES_H_ 6 #define V8_WASM_OPCODES_H_
7 7
8 #include "src/globals.h" 8 #include "src/globals.h"
9 #include "src/machine-type.h" 9 #include "src/machine-type.h"
10 #include "src/signature.h" 10 #include "src/signature.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 V(I32AsmjsStoreMem, 0xdd, i_ii) \ 270 V(I32AsmjsStoreMem, 0xdd, i_ii) \
271 V(F32AsmjsStoreMem, 0xde, f_if) \ 271 V(F32AsmjsStoreMem, 0xde, f_if) \
272 V(F64AsmjsStoreMem, 0xdf, d_id) \ 272 V(F64AsmjsStoreMem, 0xdf, d_id) \
273 V(I32AsmjsSConvertF32, 0xe0, i_f) \ 273 V(I32AsmjsSConvertF32, 0xe0, i_f) \
274 V(I32AsmjsUConvertF32, 0xe1, i_f) \ 274 V(I32AsmjsUConvertF32, 0xe1, i_f) \
275 V(I32AsmjsSConvertF64, 0xe2, i_d) \ 275 V(I32AsmjsSConvertF64, 0xe2, i_d) \
276 V(I32AsmjsUConvertF64, 0xe3, i_d) 276 V(I32AsmjsUConvertF64, 0xe3, i_d)
277 277
278 #define FOREACH_SIMD_0_OPERAND_OPCODE(V) \ 278 #define FOREACH_SIMD_0_OPERAND_OPCODE(V) \
279 V(F32x4Splat, 0xe500, s_f) \ 279 V(F32x4Splat, 0xe500, s_f) \
280 V(F32x4ReplaceLane, 0xe502, s_sif) \
281 V(F32x4Abs, 0xe503, s_s) \ 280 V(F32x4Abs, 0xe503, s_s) \
282 V(F32x4Neg, 0xe504, s_s) \ 281 V(F32x4Neg, 0xe504, s_s) \
283 V(F32x4Sqrt, 0xe505, s_s) \ 282 V(F32x4Sqrt, 0xe505, s_s) \
284 V(F32x4RecipApprox, 0xe506, s_s) \ 283 V(F32x4RecipApprox, 0xe506, s_s) \
285 V(F32x4SqrtApprox, 0xe507, s_s) \ 284 V(F32x4SqrtApprox, 0xe507, s_s) \
286 V(F32x4Add, 0xe508, s_ss) \ 285 V(F32x4Add, 0xe508, s_ss) \
287 V(F32x4Sub, 0xe509, s_ss) \ 286 V(F32x4Sub, 0xe509, s_ss) \
288 V(F32x4Mul, 0xe50a, s_ss) \ 287 V(F32x4Mul, 0xe50a, s_ss) \
289 V(F32x4Div, 0xe50b, s_ss) \ 288 V(F32x4Div, 0xe50b, s_ss) \
290 V(F32x4Min, 0xe50c, s_ss) \ 289 V(F32x4Min, 0xe50c, s_ss) \
291 V(F32x4Max, 0xe50d, s_ss) \ 290 V(F32x4Max, 0xe50d, s_ss) \
292 V(F32x4MinNum, 0xe50e, s_ss) \ 291 V(F32x4MinNum, 0xe50e, s_ss) \
293 V(F32x4MaxNum, 0xe50f, s_ss) \ 292 V(F32x4MaxNum, 0xe50f, s_ss) \
294 V(F32x4Eq, 0xe510, s_ss) \ 293 V(F32x4Eq, 0xe510, s_ss) \
295 V(F32x4Ne, 0xe511, s_ss) \ 294 V(F32x4Ne, 0xe511, s_ss) \
296 V(F32x4Lt, 0xe512, s_ss) \ 295 V(F32x4Lt, 0xe512, s_ss) \
297 V(F32x4Le, 0xe513, s_ss) \ 296 V(F32x4Le, 0xe513, s_ss) \
298 V(F32x4Gt, 0xe514, s_ss) \ 297 V(F32x4Gt, 0xe514, s_ss) \
299 V(F32x4Ge, 0xe515, s_ss) \ 298 V(F32x4Ge, 0xe515, s_ss) \
300 V(F32x4Select, 0xe516, s_sss) \ 299 V(F32x4Select, 0xe516, s_sss) \
301 V(F32x4Swizzle, 0xe517, s_s) \ 300 V(F32x4Swizzle, 0xe517, s_s) \
302 V(F32x4Shuffle, 0xe518, s_ss) \ 301 V(F32x4Shuffle, 0xe518, s_ss) \
303 V(F32x4FromInt32x4, 0xe519, s_s) \ 302 V(F32x4FromInt32x4, 0xe519, s_s) \
304 V(F32x4FromUint32x4, 0xe51a, s_s) \ 303 V(F32x4FromUint32x4, 0xe51a, s_s) \
305 V(I32x4Splat, 0xe51b, s_i) \ 304 V(I32x4Splat, 0xe51b, s_i) \
306 V(I32x4ReplaceLane, 0xe51d, s_sii) \
307 V(I32x4Neg, 0xe51e, s_s) \ 305 V(I32x4Neg, 0xe51e, s_s) \
308 V(I32x4Add, 0xe51f, s_ss) \ 306 V(I32x4Add, 0xe51f, s_ss) \
309 V(I32x4Sub, 0xe520, s_ss) \ 307 V(I32x4Sub, 0xe520, s_ss) \
310 V(I32x4Mul, 0xe521, s_ss) \ 308 V(I32x4Mul, 0xe521, s_ss) \
311 V(I32x4Min_s, 0xe522, s_ss) \ 309 V(I32x4Min_s, 0xe522, s_ss) \
312 V(I32x4Max_s, 0xe523, s_ss) \ 310 V(I32x4Max_s, 0xe523, s_ss) \
313 V(I32x4Shl, 0xe524, s_si) \ 311 V(I32x4Shl, 0xe524, s_si) \
314 V(I32x4Shr_s, 0xe525, s_si) \ 312 V(I32x4Shr_s, 0xe525, s_si) \
315 V(I32x4Eq, 0xe526, s_ss) \ 313 V(I32x4Eq, 0xe526, s_ss) \
316 V(I32x4Ne, 0xe527, s_ss) \ 314 V(I32x4Ne, 0xe527, s_ss) \
317 V(I32x4Lt_s, 0xe528, s_ss) \ 315 V(I32x4Lt_s, 0xe528, s_ss) \
318 V(I32x4Le_s, 0xe529, s_ss) \ 316 V(I32x4Le_s, 0xe529, s_ss) \
319 V(I32x4Gt_s, 0xe52a, s_ss) \ 317 V(I32x4Gt_s, 0xe52a, s_ss) \
320 V(I32x4Ge_s, 0xe52b, s_ss) \ 318 V(I32x4Ge_s, 0xe52b, s_ss) \
321 V(I32x4Select, 0xe52c, s_sss) \ 319 V(I32x4Select, 0xe52c, s_sss) \
322 V(I32x4Swizzle, 0xe52d, s_s) \ 320 V(I32x4Swizzle, 0xe52d, s_s) \
323 V(I32x4Shuffle, 0xe52e, s_ss) \ 321 V(I32x4Shuffle, 0xe52e, s_ss) \
324 V(I32x4FromFloat32x4, 0xe52f, s_s) \ 322 V(I32x4FromFloat32x4, 0xe52f, s_s) \
325 V(I32x4Min_u, 0xe530, s_ss) \ 323 V(I32x4Min_u, 0xe530, s_ss) \
326 V(I32x4Max_u, 0xe531, s_ss) \ 324 V(I32x4Max_u, 0xe531, s_ss) \
327 V(I32x4Shr_u, 0xe532, s_ss) \ 325 V(I32x4Shr_u, 0xe532, s_ss) \
328 V(I32x4Lt_u, 0xe533, s_ss) \ 326 V(I32x4Lt_u, 0xe533, s_ss) \
329 V(I32x4Le_u, 0xe534, s_ss) \ 327 V(I32x4Le_u, 0xe534, s_ss) \
330 V(I32x4Gt_u, 0xe535, s_ss) \ 328 V(I32x4Gt_u, 0xe535, s_ss) \
331 V(I32x4Ge_u, 0xe536, s_ss) \ 329 V(I32x4Ge_u, 0xe536, s_ss) \
332 V(Ui32x4FromFloat32x4, 0xe537, s_s) \ 330 V(Ui32x4FromFloat32x4, 0xe537, s_s) \
333 V(I16x8Splat, 0xe538, s_i) \ 331 V(I16x8Splat, 0xe538, s_i) \
334 V(I16x8ReplaceLane, 0xe53a, s_sii) \
335 V(I16x8Neg, 0xe53b, s_s) \ 332 V(I16x8Neg, 0xe53b, s_s) \
336 V(I16x8Add, 0xe53c, s_ss) \ 333 V(I16x8Add, 0xe53c, s_ss) \
337 V(I16x8AddSaturate_s, 0xe53d, s_ss) \ 334 V(I16x8AddSaturate_s, 0xe53d, s_ss) \
338 V(I16x8Sub, 0xe53e, s_ss) \ 335 V(I16x8Sub, 0xe53e, s_ss) \
339 V(I16x8SubSaturate_s, 0xe53f, s_ss) \ 336 V(I16x8SubSaturate_s, 0xe53f, s_ss) \
340 V(I16x8Mul, 0xe540, s_ss) \ 337 V(I16x8Mul, 0xe540, s_ss) \
341 V(I16x8Min_s, 0xe541, s_ss) \ 338 V(I16x8Min_s, 0xe541, s_ss) \
342 V(I16x8Max_s, 0xe542, s_ss) \ 339 V(I16x8Max_s, 0xe542, s_ss) \
343 V(I16x8Shl, 0xe543, s_si) \ 340 V(I16x8Shl, 0xe543, s_si) \
344 V(I16x8Shr_s, 0xe544, s_si) \ 341 V(I16x8Shr_s, 0xe544, s_si) \
345 V(I16x8Eq, 0xe545, s_ss) \ 342 V(I16x8Eq, 0xe545, s_ss) \
346 V(I16x8Ne, 0xe546, s_ss) \ 343 V(I16x8Ne, 0xe546, s_ss) \
347 V(I16x8Lt_s, 0xe547, s_ss) \ 344 V(I16x8Lt_s, 0xe547, s_ss) \
348 V(I16x8Le_s, 0xe548, s_ss) \ 345 V(I16x8Le_s, 0xe548, s_ss) \
349 V(I16x8Gt_s, 0xe549, s_ss) \ 346 V(I16x8Gt_s, 0xe549, s_ss) \
350 V(I16x8Ge_s, 0xe54a, s_ss) \ 347 V(I16x8Ge_s, 0xe54a, s_ss) \
351 V(I16x8Select, 0xe54b, s_sss) \ 348 V(I16x8Select, 0xe54b, s_sss) \
352 V(I16x8Swizzle, 0xe54c, s_s) \ 349 V(I16x8Swizzle, 0xe54c, s_s) \
353 V(I16x8Shuffle, 0xe54d, s_ss) \ 350 V(I16x8Shuffle, 0xe54d, s_ss) \
354 V(I16x8AddSaturate_u, 0xe54e, s_ss) \ 351 V(I16x8AddSaturate_u, 0xe54e, s_ss) \
355 V(I16x8SubSaturate_u, 0xe54f, s_ss) \ 352 V(I16x8SubSaturate_u, 0xe54f, s_ss) \
356 V(I16x8Min_u, 0xe550, s_ss) \ 353 V(I16x8Min_u, 0xe550, s_ss) \
357 V(I16x8Max_u, 0xe551, s_ss) \ 354 V(I16x8Max_u, 0xe551, s_ss) \
358 V(I16x8Shr_u, 0xe552, s_si) \ 355 V(I16x8Shr_u, 0xe552, s_si) \
359 V(I16x8Lt_u, 0xe553, s_ss) \ 356 V(I16x8Lt_u, 0xe553, s_ss) \
360 V(I16x8Le_u, 0xe554, s_ss) \ 357 V(I16x8Le_u, 0xe554, s_ss) \
361 V(I16x8Gt_u, 0xe555, s_ss) \ 358 V(I16x8Gt_u, 0xe555, s_ss) \
362 V(I16x8Ge_u, 0xe556, s_ss) \ 359 V(I16x8Ge_u, 0xe556, s_ss) \
363 V(I8x16Splat, 0xe557, s_i) \ 360 V(I8x16Splat, 0xe557, s_i) \
364 V(I8x16ReplaceLane, 0xe559, s_sii) \
365 V(I8x16Neg, 0xe55a, s_s) \ 361 V(I8x16Neg, 0xe55a, s_s) \
366 V(I8x16Add, 0xe55b, s_ss) \ 362 V(I8x16Add, 0xe55b, s_ss) \
367 V(I8x16AddSaturate_s, 0xe55c, s_ss) \ 363 V(I8x16AddSaturate_s, 0xe55c, s_ss) \
368 V(I8x16Sub, 0xe55d, s_ss) \ 364 V(I8x16Sub, 0xe55d, s_ss) \
369 V(I8x16SubSaturate_s, 0xe55e, s_ss) \ 365 V(I8x16SubSaturate_s, 0xe55e, s_ss) \
370 V(I8x16Mul, 0xe55f, s_ss) \ 366 V(I8x16Mul, 0xe55f, s_ss) \
371 V(I8x16Min_s, 0xe560, s_ss) \ 367 V(I8x16Min_s, 0xe560, s_ss) \
372 V(I8x16Max_s, 0xe561, s_ss) \ 368 V(I8x16Max_s, 0xe561, s_ss) \
373 V(I8x16Shl, 0xe562, s_si) \ 369 V(I8x16Shl, 0xe562, s_si) \
374 V(I8x16Shr_s, 0xe563, s_si) \ 370 V(I8x16Shr_s, 0xe563, s_si) \
(...skipping 15 matching lines...) Expand all
390 V(I8x16Le_u, 0xe573, s_ss) \ 386 V(I8x16Le_u, 0xe573, s_ss) \
391 V(I8x16Gt_u, 0xe574, s_ss) \ 387 V(I8x16Gt_u, 0xe574, s_ss) \
392 V(I8x16Ge_u, 0xe575, s_ss) \ 388 V(I8x16Ge_u, 0xe575, s_ss) \
393 V(S128And, 0xe576, s_ss) \ 389 V(S128And, 0xe576, s_ss) \
394 V(S128Ior, 0xe577, s_ss) \ 390 V(S128Ior, 0xe577, s_ss) \
395 V(S128Xor, 0xe578, s_ss) \ 391 V(S128Xor, 0xe578, s_ss) \
396 V(S128Not, 0xe579, s_s) 392 V(S128Not, 0xe579, s_s)
397 393
398 #define FOREACH_SIMD_1_OPERAND_OPCODE(V) \ 394 #define FOREACH_SIMD_1_OPERAND_OPCODE(V) \
399 V(F32x4ExtractLane, 0xe501, _) \ 395 V(F32x4ExtractLane, 0xe501, _) \
396 V(F32x4ReplaceLane, 0xe502, _) \
400 V(I32x4ExtractLane, 0xe51c, _) \ 397 V(I32x4ExtractLane, 0xe51c, _) \
398 V(I32x4ReplaceLane, 0xe51d, _) \
401 V(I16x8ExtractLane, 0xe539, _) \ 399 V(I16x8ExtractLane, 0xe539, _) \
402 V(I8x16ExtractLane, 0xe558, _) 400 V(I16x8ReplaceLane, 0xe53a, _) \
401 V(I8x16ExtractLane, 0xe558, _) \
402 V(I8x16ReplaceLane, 0xe559, _)
403 403
404 // All opcodes. 404 // All opcodes.
405 #define FOREACH_OPCODE(V) \ 405 #define FOREACH_OPCODE(V) \
406 FOREACH_CONTROL_OPCODE(V) \ 406 FOREACH_CONTROL_OPCODE(V) \
407 FOREACH_MISC_OPCODE(V) \ 407 FOREACH_MISC_OPCODE(V) \
408 FOREACH_SIMPLE_OPCODE(V) \ 408 FOREACH_SIMPLE_OPCODE(V) \
409 FOREACH_SIMPLE_MEM_OPCODE(V) \ 409 FOREACH_SIMPLE_MEM_OPCODE(V) \
410 FOREACH_STORE_MEM_OPCODE(V) \ 410 FOREACH_STORE_MEM_OPCODE(V) \
411 FOREACH_LOAD_MEM_OPCODE(V) \ 411 FOREACH_LOAD_MEM_OPCODE(V) \
412 FOREACH_MISC_MEM_OPCODE(V) \ 412 FOREACH_MISC_MEM_OPCODE(V) \
(...skipping 28 matching lines...) Expand all
441 V(d_f, kAstF64, kAstF32) \ 441 V(d_f, kAstF64, kAstF32) \
442 V(d_i, kAstF64, kAstI32) \ 442 V(d_i, kAstF64, kAstI32) \
443 V(d_l, kAstF64, kAstI64) \ 443 V(d_l, kAstF64, kAstI64) \
444 V(d_id, kAstF64, kAstI32, kAstF64) \ 444 V(d_id, kAstF64, kAstI32, kAstF64) \
445 V(f_if, kAstF32, kAstI32, kAstF32) \ 445 V(f_if, kAstF32, kAstI32, kAstF32) \
446 V(l_il, kAstI64, kAstI32, kAstI64) 446 V(l_il, kAstI64, kAstI32, kAstI64)
447 447
448 #define FOREACH_SIMD_SIGNATURE(V) \ 448 #define FOREACH_SIMD_SIGNATURE(V) \
449 V(s_s, kAstS128, kAstS128) \ 449 V(s_s, kAstS128, kAstS128) \
450 V(s_f, kAstS128, kAstF32) \ 450 V(s_f, kAstS128, kAstF32) \
451 V(s_sif, kAstS128, kAstS128, kAstI32, kAstF32) \
452 V(s_ss, kAstS128, kAstS128, kAstS128) \ 451 V(s_ss, kAstS128, kAstS128, kAstS128) \
453 V(s_sss, kAstS128, kAstS128, kAstS128, kAstS128) \ 452 V(s_sss, kAstS128, kAstS128, kAstS128, kAstS128) \
454 V(s_i, kAstS128, kAstI32) \ 453 V(s_i, kAstS128, kAstI32) \
455 V(s_sii, kAstS128, kAstS128, kAstI32, kAstI32) \
456 V(s_si, kAstS128, kAstS128, kAstI32) 454 V(s_si, kAstS128, kAstS128, kAstI32)
457 455
458 #define FOREACH_PREFIX(V) V(Simd, 0xe5) 456 #define FOREACH_PREFIX(V) V(Simd, 0xe5)
459 457
460 enum WasmOpcode { 458 enum WasmOpcode {
461 // Declare expression opcodes. 459 // Declare expression opcodes.
462 #define DECLARE_NAMED_ENUM(name, opcode, sig) kExpr##name = opcode, 460 #define DECLARE_NAMED_ENUM(name, opcode, sig) kExpr##name = opcode,
463 FOREACH_OPCODE(DECLARE_NAMED_ENUM) 461 FOREACH_OPCODE(DECLARE_NAMED_ENUM)
464 #undef DECLARE_NAMED_ENUM 462 #undef DECLARE_NAMED_ENUM
465 #define DECLARE_PREFIX(name, opcode) k##name##Prefix = opcode, 463 #define DECLARE_PREFIX(name, opcode) k##name##Prefix = opcode,
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 default: 639 default:
642 return "<unknown>"; 640 return "<unknown>";
643 } 641 }
644 } 642 }
645 }; 643 };
646 } // namespace wasm 644 } // namespace wasm
647 } // namespace internal 645 } // namespace internal
648 } // namespace v8 646 } // namespace v8
649 647
650 #endif // V8_WASM_OPCODES_H_ 648 #endif // V8_WASM_OPCODES_H_
OLDNEW
« no previous file with comments | « src/wasm/wasm-macro-gen.h ('k') | test/cctest/wasm/test-run-wasm-simd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698