Commit c3f9d3cd authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

[wasm-simd] Update Wasm SIMD opcodes

Bump wasm-spec-tests version since the opcodes have also changed.

Also add missing opcodes to wasm-module-builder.js.

Bug: v8:6020
Change-Id: I60dcf1b300a5278aab5e1814c9ebf4ee85c60053
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2728432Reviewed-by: 's avatarDeepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73233}
parent 79cbef35
......@@ -293,18 +293,18 @@ bool V8_EXPORT_PRIVATE IsJSCompatibleSignature(const FunctionSig* sig,
V(S128Load32Splat, 0xfd09, s_i) \
V(S128Load64Splat, 0xfd0a, s_i) \
V(S128StoreMem, 0xfd0b, v_is) \
V(S128Load32Zero, 0xfdfc, s_i) \
V(S128Load64Zero, 0xfdfd, s_i)
V(S128Load32Zero, 0xfd5c, s_i) \
V(S128Load64Zero, 0xfd5d, s_i)
#define FOREACH_SIMD_MEM_1_OPERAND_OPCODE(V) \
V(S128Load8Lane, 0xfd58, s_is) \
V(S128Load16Lane, 0xfd59, s_is) \
V(S128Load32Lane, 0xfd5a, s_is) \
V(S128Load64Lane, 0xfd5b, s_is) \
V(S128Store8Lane, 0xfd5c, v_is) \
V(S128Store16Lane, 0xfd5d, v_is) \
V(S128Store32Lane, 0xfd5e, v_is) \
V(S128Store64Lane, 0xfd5f, v_is)
V(S128Load8Lane, 0xfd54, s_is) \
V(S128Load16Lane, 0xfd55, s_is) \
V(S128Load32Lane, 0xfd56, s_is) \
V(S128Load64Lane, 0xfd57, s_is) \
V(S128Store8Lane, 0xfd58, v_is) \
V(S128Store16Lane, 0xfd59, v_is) \
V(S128Store32Lane, 0xfd5a, v_is) \
V(S128Store64Lane, 0xfd5b, v_is)
#define FOREACH_SIMD_CONST_OPCODE(V) V(S128Const, 0xfd0c, _)
......@@ -348,12 +348,6 @@ bool V8_EXPORT_PRIVATE IsJSCompatibleSignature(const FunctionSig* sig,
V(I32x4LeU, 0xfd3e, s_ss) \
V(I32x4GeS, 0xfd3f, s_ss) \
V(I32x4GeU, 0xfd40, s_ss) \
V(I64x2Eq, 0xfdc0, s_ss) \
V(I64x2LtS, 0xfd74, s_ss) \
V(I64x2GtS, 0xfd7a, s_ss) \
V(I64x2LeS, 0xfdee, s_ss) \
V(I64x2GeS, 0xfde2, s_ss) \
V(I64x2Ne, 0xfdd0, s_ss) \
V(F32x4Eq, 0xfd41, s_ss) \
V(F32x4Ne, 0xfd42, s_ss) \
V(F32x4Lt, 0xfd43, s_ss) \
......@@ -372,13 +366,20 @@ bool V8_EXPORT_PRIVATE IsJSCompatibleSignature(const FunctionSig* sig,
V(S128Or, 0xfd50, s_ss) \
V(S128Xor, 0xfd51, s_ss) \
V(S128Select, 0xfd52, s_sss) \
V(V128AnyTrue, 0xfd53, i_s) \
V(F32x4DemoteF64x2Zero, 0xfd5e, s_s) \
V(F64x2PromoteLowF32x4, 0xfd5f, s_s) \
V(I8x16Abs, 0xfd60, s_s) \
V(I8x16Neg, 0xfd61, s_s) \
V(V128AnyTrue, 0xfd62, i_s) \
V(I8x16Popcnt, 0xfd62, s_s) \
V(V8x16AllTrue, 0xfd63, i_s) \
V(I8x16BitMask, 0xfd64, i_s) \
V(I8x16SConvertI16x8, 0xfd65, s_ss) \
V(I8x16UConvertI16x8, 0xfd66, s_ss) \
V(F32x4Ceil, 0xfd67, s_s) \
V(F32x4Floor, 0xfd68, s_s) \
V(F32x4Trunc, 0xfd69, s_s) \
V(F32x4NearestInt, 0xfd6a, s_s) \
V(I8x16Shl, 0xfd6b, s_si) \
V(I8x16ShrS, 0xfd6c, s_si) \
V(I8x16ShrU, 0xfd6d, s_si) \
......@@ -388,14 +389,21 @@ bool V8_EXPORT_PRIVATE IsJSCompatibleSignature(const FunctionSig* sig,
V(I8x16Sub, 0xfd71, s_ss) \
V(I8x16SubSatS, 0xfd72, s_ss) \
V(I8x16SubSatU, 0xfd73, s_ss) \
V(F64x2Ceil, 0xfd74, s_s) \
V(F64x2Floor, 0xfd75, s_s) \
V(I8x16MinS, 0xfd76, s_ss) \
V(I8x16MinU, 0xfd77, s_ss) \
V(I8x16MaxS, 0xfd78, s_ss) \
V(I8x16MaxU, 0xfd79, s_ss) \
V(F64x2Trunc, 0xfd7a, s_s) \
V(I8x16RoundingAverageU, 0xfd7b, s_ss) \
V(I8x16Popcnt, 0xfd7c, s_s) \
V(I16x8ExtAddPairwiseI8x16S, 0xfd7c, s_s) \
V(I16x8ExtAddPairwiseI8x16U, 0xfd7d, s_s) \
V(I32x4ExtAddPairwiseI16x8S, 0xfd7e, s_s) \
V(I32x4ExtAddPairwiseI16x8U, 0xfd7f, s_s) \
V(I16x8Abs, 0xfd80, s_s) \
V(I16x8Neg, 0xfd81, s_s) \
V(I16x8Q15MulRSatS, 0xfd82, s_ss) \
V(V16x8AllTrue, 0xfd83, i_s) \
V(I16x8BitMask, 0xfd84, i_s) \
V(I16x8SConvertI32x4, 0xfd85, s_ss) \
......@@ -413,19 +421,17 @@ bool V8_EXPORT_PRIVATE IsJSCompatibleSignature(const FunctionSig* sig,
V(I16x8Sub, 0xfd91, s_ss) \
V(I16x8SubSatS, 0xfd92, s_ss) \
V(I16x8SubSatU, 0xfd93, s_ss) \
V(F64x2NearestInt, 0xfd94, s_s) \
V(I16x8Mul, 0xfd95, s_ss) \
V(I16x8MinS, 0xfd96, s_ss) \
V(I16x8MinU, 0xfd97, s_ss) \
V(I16x8MaxS, 0xfd98, s_ss) \
V(I16x8MaxU, 0xfd99, s_ss) \
V(I16x8RoundingAverageU, 0xfd9b, s_ss) \
V(I16x8ExtMulLowI8x16S, 0xfd9a, s_ss) \
V(I16x8ExtMulLowI8x16S, 0xfd9c, s_ss) \
V(I16x8ExtMulHighI8x16S, 0xfd9d, s_ss) \
V(I16x8ExtMulLowI8x16U, 0xfd9e, s_ss) \
V(I16x8ExtMulHighI8x16U, 0xfd9f, s_ss) \
V(I16x8Q15MulRSatS, 0xfd9c, s_ss) \
V(I16x8ExtAddPairwiseI8x16S, 0xfdc2, s_s) \
V(I16x8ExtAddPairwiseI8x16U, 0xfdc3, s_s) \
V(I32x4Abs, 0xfda0, s_s) \
V(I32x4Neg, 0xfda1, s_s) \
V(V32x4AllTrue, 0xfda3, i_s) \
......@@ -445,32 +451,34 @@ bool V8_EXPORT_PRIVATE IsJSCompatibleSignature(const FunctionSig* sig,
V(I32x4MaxS, 0xfdb8, s_ss) \
V(I32x4MaxU, 0xfdb9, s_ss) \
V(I32x4DotI16x8S, 0xfdba, s_ss) \
V(I32x4ExtMulLowI16x8S, 0xfdbb, s_ss) \
V(I32x4ExtMulLowI16x8S, 0xfdbc, s_ss) \
V(I32x4ExtMulHighI16x8S, 0xfdbd, s_ss) \
V(I32x4ExtMulLowI16x8U, 0xfdbe, s_ss) \
V(I32x4ExtMulHighI16x8U, 0xfdbf, s_ss) \
V(I32x4TruncSatF64x2SZero, 0xfd55, s_s) \
V(I32x4TruncSatF64x2UZero, 0xfd56, s_s) \
V(I32x4ExtAddPairwiseI16x8S, 0xfda5, s_s) \
V(I32x4ExtAddPairwiseI16x8U, 0xfda6, s_s) \
V(I64x2Abs, 0xfda2, s_s) \
V(I64x2Abs, 0xfdc0, s_s) \
V(I64x2Neg, 0xfdc1, s_s) \
V(V64x2AllTrue, 0xfdcf, i_s) \
V(V64x2AllTrue, 0xfdc3, i_s) \
V(I64x2BitMask, 0xfdc4, i_s) \
V(I64x2SConvertI32x4Low, 0xfdc7, s_s) \
V(I64x2SConvertI32x4High, 0xfdc8, s_s) \
V(I64x2UConvertI32x4Low, 0xfdc9, s_s) \
V(I64x2UConvertI32x4High, 0xfdca, s_s) \
V(I64x2Shl, 0xfdcb, s_si) \
V(I64x2ShrS, 0xfdcc, s_si) \
V(I64x2ShrU, 0xfdcd, s_si) \
V(I64x2Add, 0xfdce, s_ss) \
V(I64x2Sub, 0xfdd1, s_ss) \
V(I64x2Mul, 0xfdd5, s_ss) \
V(I64x2ExtMulLowI32x4S, 0xfdd2, s_ss) \
V(I64x2ExtMulHighI32x4S, 0xfdd3, s_ss) \
V(I64x2ExtMulLowI32x4U, 0xfdd6, s_ss) \
V(I64x2ExtMulHighI32x4U, 0xfdd7, s_ss) \
V(I64x2SConvertI32x4Low, 0xfdc7, s_s) \
V(I64x2SConvertI32x4High, 0xfdc8, s_s) \
V(I64x2UConvertI32x4Low, 0xfdc9, s_s) \
V(I64x2UConvertI32x4High, 0xfdca, s_s) \
V(I64x2Eq, 0xfdd6, s_ss) \
V(I64x2Ne, 0xfdd7, s_ss) \
V(I64x2LtS, 0xfdd8, s_ss) \
V(I64x2GtS, 0xfdd9, s_ss) \
V(I64x2LeS, 0xfdda, s_ss) \
V(I64x2GeS, 0xfddb, s_ss) \
V(I64x2ExtMulLowI32x4S, 0xfddc, s_ss) \
V(I64x2ExtMulHighI32x4S, 0xfddd, s_ss) \
V(I64x2ExtMulLowI32x4U, 0xfdde, s_ss) \
V(I64x2ExtMulHighI32x4U, 0xfddf, s_ss) \
V(F32x4Abs, 0xfde0, s_s) \
V(F32x4Neg, 0xfde1, s_s) \
V(F32x4Sqrt, 0xfde3, s_s) \
......@@ -482,7 +490,6 @@ bool V8_EXPORT_PRIVATE IsJSCompatibleSignature(const FunctionSig* sig,
V(F32x4Max, 0xfde9, s_ss) \
V(F32x4Pmin, 0xfdea, s_ss) \
V(F32x4Pmax, 0xfdeb, s_ss) \
V(F32x4DemoteF64x2Zero, 0xfd57, s_s) \
V(F64x2Abs, 0xfdec, s_s) \
V(F64x2Neg, 0xfded, s_s) \
V(F64x2Sqrt, 0xfdef, s_s) \
......@@ -498,29 +505,22 @@ bool V8_EXPORT_PRIVATE IsJSCompatibleSignature(const FunctionSig* sig,
V(I32x4UConvertF32x4, 0xfdf9, s_s) \
V(F32x4SConvertI32x4, 0xfdfa, s_s) \
V(F32x4UConvertI32x4, 0xfdfb, s_s) \
V(F32x4Ceil, 0xfdd8, s_s) \
V(F32x4Floor, 0xfdd9, s_s) \
V(F32x4Trunc, 0xfdda, s_s) \
V(F32x4NearestInt, 0xfddb, s_s) \
V(F64x2Ceil, 0xfddc, s_s) \
V(F64x2Floor, 0xfddd, s_s) \
V(F64x2Trunc, 0xfdde, s_s) \
V(F64x2NearestInt, 0xfddf, s_s) \
V(F64x2ConvertLowI32x4S, 0xfd53, s_s) \
V(F64x2ConvertLowI32x4U, 0xfd54, s_s) \
V(F64x2PromoteLowF32x4, 0xfd69, s_s)
V(I32x4TruncSatF64x2SZero, 0xfdfc, s_s) \
V(I32x4TruncSatF64x2UZero, 0xfdfd, s_s) \
V(F64x2ConvertLowI32x4S, 0xfdfe, s_s) \
V(F64x2ConvertLowI32x4U, 0xfdff, s_s)
#define FOREACH_SIMD_POST_MVP_MEM_OPCODE(V) \
V(PrefetchT, 0xfdc5, v_i) \
V(PrefetchNT, 0xfdc6, v_i)
#define FOREACH_SIMD_POST_MVP_OPCODE(V) \
V(F32x4Qfma, 0xfdb4, s_sss) \
V(F32x4Qfms, 0xfdd4, s_sss) \
V(F64x2Qfma, 0xfdfe, s_sss) \
V(F64x2Qfms, 0xfdff, s_sss) \
V(F32x4RecipApprox, 0xfdb3, s_s) \
V(F32x4RecipSqrtApprox, 0xfdbc, s_s)
#define FOREACH_SIMD_POST_MVP_OPCODE(V) \
V(F32x4Qfma, 0xfdaf, s_sss) \
V(F32x4Qfms, 0xfdb0, s_sss) \
V(F64x2Qfma, 0xfdcf, s_sss) \
V(F64x2Qfms, 0xfdd0, s_sss) \
V(F32x4RecipApprox, 0xfdd2, s_s) \
V(F32x4RecipSqrtApprox, 0xfdd3, s_s)
#define FOREACH_SIMD_1_OPERAND_1_PARAM_OPCODE(V) \
V(I8x16ExtractLaneS, 0xfd15, _) \
......
......@@ -558,11 +558,10 @@ let kExprS128Load16Splat = 0x08;
let kExprS128Load32Splat = 0x09;
let kExprS128Load64Splat = 0x0a;
let kExprS128StoreMem = 0x0b;
let kExprS128Const = 0x0c;
let kExprI8x16Shuffle = 0x0d;
let kExprI8x16Swizzle = 0x0e;
let kExprI8x16Splat = 0x0f;
let kExprI16x8Splat = 0x10;
let kExprI32x4Splat = 0x11;
......@@ -626,12 +625,30 @@ let kExprS128AndNot = 0x4f;
let kExprS128Or = 0x50;
let kExprS128Xor = 0x51;
let kExprS128Select = 0x52;
let kExprV128AnyTrue = 0x53;
let kExprS128Load8Lane = 0x54;
let kExprS128Load16Lane = 0x55;
let kExprS128Load32Lane = 0x56;
let kExprS128Load64Lane = 0x57;
let kExprS128Store8Lane = 0x58;
let kExprS128Store16Lane = 0x59;
let kExprS128Store32Lane = 0x5a;
let kExprS128Store64Lane = 0x5b;
let kExprS128Load32Zero = 0x5c;
let kExprS128Load64Zero = 0x5d;
let kExprF32x4DemoteF64x2Zero = 0x5e;
let kExprF64x2PromoteLowF32x4 = 0x5f;
let kExprI8x16Abs = 0x60;
let kExprI8x16Neg = 0x61;
let kExprV128AnyTrue = 0x62;
let kExprI8x16Popcnt = 0x62;
let kExprV8x16AllTrue = 0x63;
let kExprI8x16BitMask = 0x64;
let kExprI8x16SConvertI16x8 = 0x65;
let kExprI8x16UConvertI16x8 = 0x66;
let kExprF32x4Ceil = 0x67;
let kExprF32x4Floor = 0x68;
let kExprF32x4Trunc = 0x69;
let kExprF32x4NearestInt = 0x6a;
let kExprI8x16Shl = 0x6b;
let kExprI8x16ShrS = 0x6c;
let kExprI8x16ShrU = 0x6d;
......@@ -641,14 +658,23 @@ let kExprI8x16AddSatU = 0x70;
let kExprI8x16Sub = 0x71;
let kExprI8x16SubSatS = 0x72;
let kExprI8x16SubSatU = 0x73;
let kExprF64x2Ceil = 0x74;
let kExprF64x2Floor = 0x75;
let kExprI8x16MinS = 0x76;
let kExprI8x16MinU = 0x77;
let kExprI8x16MaxS = 0x78;
let kExprI8x16MaxU = 0x79;
let kExprF64x2Trunc = 0x7a;
let kExprI8x16RoundingAverageU = 0x7b;
let kExprI16x8ExtAddPairwiseI8x16S = 0x7c;
let kExprI16x8ExtAddPairwiseI8x16U = 0x7d;
let kExprI32x4ExtAddPairwiseI16x8S = 0x7e;
let kExprI32x4ExtAddPairwiseI16x8U = 0x7f;
let kExprI16x8Abs = 0x80;
let kExprI16x8Neg = 0x81;
let kExprI16x8Q15MulRSatS = 0x82;
let kExprV16x8AllTrue = 0x83;
let kExprI16x8BitMask = 0x84;
let kExprI16x8SConvertI32x4 = 0x85;
let kExprI16x8UConvertI32x4 = 0x86;
let kExprI16x8SConvertI8x16Low = 0x87;
......@@ -664,15 +690,21 @@ let kExprI16x8AddSatU = 0x90;
let kExprI16x8Sub = 0x91;
let kExprI16x8SubSatS = 0x92;
let kExprI16x8SubSatU = 0x93;
let kExprF64x2NearestInt = 0x94;
let kExprI16x8Mul = 0x95;
let kExprI16x8MinS = 0x96;
let kExprI16x8MinU = 0x97;
let kExprI16x8MaxS = 0x98;
let kExprI16x8MaxU = 0x99;
let kExprI16x8RoundingAverageU = 0x9b;
let kExprI16x8ExtMulLowI8x16S = 0x9c;
let kExprI16x8ExtMulHighI8x16S = 0x9d;
let kExprI16x8ExtMulLowI8x16U = 0x9e;
let kExprI16x8ExtMulHighI8x16U = 0x9f;
let kExprI32x4Abs = 0xa0;
let kExprI32x4Neg = 0xa1;
let kExprV32x4AllTrue = 0xa3;
let kExprI32x4BitMask = 0xa4;
let kExprI32x4SConvertI16x8Low = 0xa7;
let kExprI32x4SConvertI16x8High = 0xa8;
let kExprI32x4UConvertI16x8Low = 0xa9;
......@@ -687,14 +719,35 @@ let kExprI32x4MinS = 0xb6;
let kExprI32x4MinU = 0xb7;
let kExprI32x4MaxS = 0xb8;
let kExprI32x4MaxU = 0xb9;
let kExprI32x4DotI16x8S = 0xba;
let kExprI32x4ExtMulLowI16x8S = 0xbc;
let kExprI32x4ExtMulHighI16x8S = 0xbd;
let kExprI32x4ExtMulLowI16x8U = 0xbe;
let kExprI32x4ExtMulHighI16x8U = 0xbf;
let kExprI64x2Abs = 0xc0;
let kExprI64x2Neg = 0xc1;
let kExprV64x2AllTrue = 0xc3;
let kExprI64x2BitMask = 0xc4;
let kExprI64x2SConvertI32x4Low = 0xc7;
let kExprI64x2SConvertI32x4High = 0xc8;
let kExprI64x2UConvertI32x4Low = 0xc9;
let kExprI64x2UConvertI32x4High = 0xca;
let kExprI64x2Shl = 0xcb;
let kExprI64x2ShrS = 0xcc;
let kExprI64x2ShrU = 0xcd;
let kExprI64x2Add = 0xce;
let kExprI64x2Sub = 0xd1;
let kExprI64x2Mul = 0xd5;
let kExprI64x2ExtMulHighI32x4U = 0xd7;
let kExprI64x2Eq = 0xd6;
let kExprI64x2Ne = 0xd7;
let kExprI64x2LtS = 0xd8;
let kExprI64x2GtS = 0xd9;
let kExprI64x2LeS = 0xda;
let kExprI64x2GeS = 0xdb;
let kExprI64x2ExtMulLowI32x4S = 0xdc;
let kExprI64x2ExtMulHighI32x4S = 0xdd;
let kExprI64x2ExtMulLowI32x4U = 0xde;
let kExprI64x2ExtMulHighI32x4U = 0xdf;
let kExprF32x4Abs = 0xe0;
let kExprF32x4Neg = 0xe1;
let kExprF32x4Sqrt = 0xe3;
......@@ -704,6 +757,8 @@ let kExprF32x4Mul = 0xe6;
let kExprF32x4Div = 0xe7;
let kExprF32x4Min = 0xe8;
let kExprF32x4Max = 0xe9;
let kExprF32x4Pmin = 0xea;
let kExprF32x4Pmax = 0xeb;
let kExprF64x2Abs = 0xec;
let kExprF64x2Neg = 0xed;
let kExprF64x2Sqrt = 0xef;
......@@ -713,10 +768,16 @@ let kExprF64x2Mul = 0xf2;
let kExprF64x2Div = 0xf3;
let kExprF64x2Min = 0xf4;
let kExprF64x2Max = 0xf5;
let kExprF64x2Pmin = 0xf6;
let kExprF64x2Pmax = 0xf7;
let kExprI32x4SConvertF32x4 = 0xf8;
let kExprI32x4UConvertF32x4 = 0xf9;
let kExprF32x4SConvertI32x4 = 0xfa;
let kExprF32x4UConvertI32x4 = 0xfb;
let kExprI32x4TruncSatF64x2SZero = 0xfc;
let kExprI32x4TruncSatF64x2UZero = 0xfd;
let kExprF64x2ConvertLowI32x4S = 0xfe;
let kExprF64x2ConvertLowI32x4U = 0xff;
// Compilation hint constants.
let kCompilationHintStrategyDefault = 0x00;
......
87dab4aa27f4cce9d955b2468cca041e350d697e
\ No newline at end of file
9d2a96ab2f914b3559d16c6382cc929170c58e6d
\ No newline at end of file
8930ac77669fd0d06f6db5d42546d0702d1d82f5
\ No newline at end of file
d36fd4d2706abf81e86ddfa248ed9c7496ca415d
\ No newline at end of file
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