Commit 41fbbd12 authored by Deepti Gandluri's avatar Deepti Gandluri Committed by Commit Bot

[wasm-simd] Update SIMD opcode numbers as per the Spec change

 - Update opcode numbers, tests
 - As the wasm-module-builder currently assumes opcode bytes, skip
   the test that needs a multi-byte leb128 opcode
 - Renumber post-MVP opcodes

Change-Id: I6531e954e63986dc6f7a3144ec054d16e6dc1b05
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2173952Reviewed-by: 's avatarZhi An Ng <zhin@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67517}
parent 7e7b24eb
This diff is collapsed.
...@@ -2549,6 +2549,7 @@ WASM_SIMD_TEST(I8x16LeU) { ...@@ -2549,6 +2549,7 @@ WASM_SIMD_TEST(I8x16LeU) {
} }
WASM_SIMD_TEST(I8x16Mul) { WASM_SIMD_TEST(I8x16Mul) {
FLAG_SCOPE(wasm_simd_post_mvp);
RunI8x16BinOpTest(execution_tier, lower_simd, kExprI8x16Mul, RunI8x16BinOpTest(execution_tier, lower_simd, kExprI8x16Mul,
base::MulWithWraparound); base::MulWithWraparound);
} }
......
...@@ -69,6 +69,10 @@ ...@@ -69,6 +69,10 @@
# Enable once serializing a running isolate is fully implemented. # Enable once serializing a running isolate is fully implemented.
'serialize-deserialize-now': [SKIP], 'serialize-deserialize-now': [SKIP],
# https://crbug.com/v8/issues/10486
# Enable once multi-byte prefixed opcodes are correctly handled
'regress/wasm/regress-1065599': [SKIP],
############################################################################## ##############################################################################
# Tests where variants make no sense. # Tests where variants make no sense.
'd8/enable-tracing': [PASS, NO_VARIANTS], 'd8/enable-tracing': [PASS, NO_VARIANTS],
......
...@@ -46,7 +46,7 @@ function assert_return(action, expected) { ...@@ -46,7 +46,7 @@ function assert_return(action, expected) {
let f32 = Math.fround; let f32 = Math.fround;
// simple.wast:1 // simple.wast:1
let $1 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x09\x02\x60\x00\x00\x60\x01\x7f\x01\x7d\x03\x04\x03\x00\x00\x01\x05\x03\x01\x00\x01\x07\x1c\x02\x11\x72\x65\x70\x6c\x61\x63\x65\x5f\x6c\x61\x6e\x65\x5f\x74\x65\x73\x74\x00\x01\x04\x72\x65\x61\x64\x00\x02\x08\x01\x00\x0a\x6e\x03\x2a\x00\x41\x10\x43\x00\x00\x80\x3f\x38\x02\x00\x41\x14\x43\x00\x00\x00\x40\x38\x02\x00\x41\x18\x43\x00\x00\x40\x40\x38\x02\x00\x41\x1c\x43\x00\x00\x80\x40\x38\x02\x00\x0b\x39\x01\x01\x7b\x41\x10\x2a\x02\x00\xfd\x12\x21\x00\x20\x00\x41\x10\x2a\x01\x04\xfd\x14\x01\x21\x00\x20\x00\x41\x10\x2a\x01\x08\xfd\x14\x02\x21\x00\x20\x00\x41\x10\x2a\x01\x0c\xfd\x14\x03\x21\x00\x41\x00\x20\x00\xfd\x01\x02\x00\x0b\x07\x00\x20\x00\x2a\x02\x00\x0b"); let $1 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x09\x02\x60\x00\x00\x60\x01\x7f\x01\x7d\x03\x04\x03\x00\x00\x01\x05\x03\x01\x00\x01\x07\x1c\x02\x11\x72\x65\x70\x6c\x61\x63\x65\x5f\x6c\x61\x6e\x65\x5f\x74\x65\x73\x74\x00\x01\x04\x72\x65\x61\x64\x00\x02\x08\x01\x00\x0a\x6e\x03\x2a\x00\x41\x10\x43\x00\x00\x80\x3f\x38\x02\x00\x41\x14\x43\x00\x00\x00\x40\x38\x02\x00\x41\x18\x43\x00\x00\x40\x40\x38\x02\x00\x41\x1c\x43\x00\x00\x80\x40\x38\x02\x00\x0b\x39\x01\x01\x7b\x41\x10\x2a\x02\x00\xfd\x13\x21\x00\x20\x00\x41\x10\x2a\x01\x04\xfd\x20\x01\x21\x00\x20\x00\x41\x10\x2a\x01\x08\xfd\x20\x02\x21\x00\x20\x00\x41\x10\x2a\x01\x0c\xfd\x20\x03\x21\x00\x41\x00\x20\x00\xfd\x0b\x02\x00\x0b\x07\x00\x20\x00\x2a\x02\x00\x0b");
// simple.wast:49 // simple.wast:49
call($1, "replace_lane_test", []); call($1, "replace_lane_test", []);
......
...@@ -42,9 +42,9 @@ kExprF32Max, // f32.max ...@@ -42,9 +42,9 @@ kExprF32Max, // f32.max
kSimdPrefix, kExprF32x4Splat, // f32x4.splat kSimdPrefix, kExprF32x4Splat, // f32x4.splat
kExprI32Const, 0x83, 0x01, // i32.const kExprI32Const, 0x83, 0x01, // i32.const
kSimdPrefix, kExprI32x4Splat, // i32x4.splat kSimdPrefix, kExprI32x4Splat, // i32x4.splat
kSimdPrefix, kExprI32x4Add, // i32x4.add kSimdPrefix, kExprI32x4Eq, // i32x4.eq
kSimdPrefix, kExprI32x4Add, // i32x4.add kSimdPrefix, kExprI32x4Eq, // i32x4.eq
kSimdPrefix, kExprS1x8AnyTrue, // s1x8.any_true kSimdPrefix, kExprS1x16AnyTrue, // s1x16.any_true
kExprEnd, // end @64 kExprEnd, // end @64
]); ]);
builder.addExport('main', 0); builder.addExport('main', 0);
......
...@@ -30,7 +30,7 @@ builder.addFunction(undefined, 0 /* sig */).addBodyWithEnd([ ...@@ -30,7 +30,7 @@ builder.addFunction(undefined, 0 /* sig */).addBodyWithEnd([
0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // s8x16.shuffle 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // s8x16.shuffle
kSimdPrefix, kExprI8x16LeU, // i8x16.le_u kSimdPrefix, kExprI8x16LeU, // i8x16.le_u
kSimdPrefix, kExprS1x4AnyTrue, // s1x4.any_true kSimdPrefix, kExprS1x16AnyTrue, // s1x16.any_true
kExprMemoryGrow, 0x00, // memory.grow kExprMemoryGrow, 0x00, // memory.grow
kExprDrop, kExprDrop,
kExprEnd, // end @233 kExprEnd, // end @233
......
...@@ -42,7 +42,7 @@ load("test/mjsunit/wasm/exceptions-utils.js"); ...@@ -42,7 +42,7 @@ load("test/mjsunit/wasm/exceptions-utils.js");
kExprEnd, kExprEnd,
kExprLocalGet, 0, kExprLocalGet, 0,
kSimdPrefix, kExprI32x4Eq, kSimdPrefix, kExprI32x4Eq,
kSimdPrefix, kExprS1x4AllTrue, kSimdPrefix, kExprS1x16AllTrue,
]) ])
.exportFunc(); .exportFunc();
var instance = builder.instantiate(); var instance = builder.instantiate();
......
...@@ -468,23 +468,20 @@ let kExprI64AtomicCompareExchange32U = 0x4e; ...@@ -468,23 +468,20 @@ let kExprI64AtomicCompareExchange32U = 0x4e;
// Simd opcodes. // Simd opcodes.
let kExprS128LoadMem = 0x00; let kExprS128LoadMem = 0x00;
let kExprS128StoreMem = 0x01; let kExprS128StoreMem = 0x0b;
let kExprS8x16Shuffle = 0x03; let kExprS8x16Shuffle = 0x0d;
let kExprI8x16Splat = 0x04; let kExprI8x16Splat = 0x0f;
let kExprI16x8Splat = 0x08; let kExprI16x8Splat = 0x10;
let kExprI32x4Splat = 0x0c; let kExprI32x4Splat = 0x11;
let kExprF32x4Splat = 0x12; let kExprF32x4Splat = 0x13;
let kExprI8x16LtU = 0x1b; let kExprI8x16LtU = 0x26;
let kExprI8x16LeU = 0x1f; let kExprI8x16LeU = 0x2a;
let kExprI32x4Eq = 0x2c; let kExprI32x4Eq = 0x37;
let kExprS1x16AnyTrue = 0x52; let kExprS1x16AnyTrue = 0x62;
let kExprS1x8AnyTrue = 0x63; let kExprS1x16AllTrue = 0x63;
let kExprI16x8ShrS = 0x66; let kExprI8x16Add = 0x6e;
let kExprS1x4AllTrue = 0x75; let kExprI16x8ShrS = [0x8c, 01];
let kExprS1x4AnyTrue = 0x74; let kExprF32x4Min = [0xe8, 01];
let kExprI32x4Add = 0x79;
let kExprF32x4Min = 0x9e;
let kExprS8x16LoadSplat = [0xc2, 0x1];
// Compilation hint constants. // Compilation hint constants.
let kCompilationHintStrategyDefault = 0x00; let kCompilationHintStrategyDefault = 0x00;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment