Explorar el Código

Scrub references to WASM M128 type

Wasm type m128 is deperecated, correct type name is v128. Replace m128
with v128 in code and error messages. On the other hand, leave "m128"
values and functions that refer to __m128 hardware intrinsics.
Petr Penzin hace 7 años
padre
commit
d13dbc366e

+ 1 - 1
lib/Runtime/Language/InterpreterHandlerAsmJs.inl

@@ -420,7 +420,7 @@ EXDEF2_WMS( SIMD_B8_1U8_2toU8_1     , Simd128_Select_U8   , Js::SIMDInt32x4Opera
 EXDEF2_WMS( SIMD_B16_1U16_2toU16_1   , Simd128_Select_U16  , Js::SIMDInt32x4Operation::OpSelect         )
 
   // args out, copy value to outParams
-EXDEF3_WMS   ( CUSTOM_ASMJS      , Simd128_ArgOut_F4       , (OP_InvalidWasmTypeConversion<Wasm::WasmTypes::M128,true>)  , Reg1Float32x4_1)
+EXDEF3_WMS   ( CUSTOM_ASMJS      , Simd128_ArgOut_F4       , (OP_InvalidWasmTypeConversion<Wasm::WasmTypes::V128,true>)  , Reg1Float32x4_1)
 EXDEF2_WMS   ( SIMD_F4_1toR1Mem  , Simd128_I_ArgOut_F4     , OP_I_SetOutAsmSimd                          )
   DEF2_WMS   ( SIMD_I4_1toR1Mem  , Simd128_I_ArgOut_I4     , OP_I_SetOutAsmSimd                          )
 

+ 4 - 4
lib/Runtime/Library/WebAssemblyEnvironment.cpp

@@ -161,10 +161,10 @@ Wasm::WasmConstLitNode WebAssemblyEnvironment::GetGlobalValue(Wasm::WasmGlobal*
     case Wasm::WasmTypes::F32: cnst.f32 = GetGlobalInternal<float>(offset); break;
     case Wasm::WasmTypes::F64: cnst.f64 = GetGlobalInternal<double>(offset); break;
 #ifdef ENABLE_WASM_SIMD
-    case Wasm::WasmTypes::M128: AssertOrFailFastMsg(UNREACHED, "Wasm.Simd globals not supported");
+    case Wasm::WasmTypes::V128: AssertOrFailFastMsg(UNREACHED, "Wasm.Simd globals not supported");
 #endif
     default:
-        Wasm::WasmTypes::CompileAssertCases<Wasm::WasmTypes::I32, Wasm::WasmTypes::I64, Wasm::WasmTypes::F32, Wasm::WasmTypes::F64, WASM_M128_CHECK_TYPE>();
+        Wasm::WasmTypes::CompileAssertCases<Wasm::WasmTypes::I32, Wasm::WasmTypes::I64, Wasm::WasmTypes::F32, Wasm::WasmTypes::F64, WASM_V128_CHECK_TYPE>();
     }
     return cnst;
 }
@@ -181,10 +181,10 @@ void WebAssemblyEnvironment::SetGlobalValue(Wasm::WasmGlobal* global, Wasm::Wasm
     case Wasm::WasmTypes::F32: SetGlobalInternal<float>(offset, cnst.f32); break;
     case Wasm::WasmTypes::F64: SetGlobalInternal<double>(offset, cnst.f64); break;
 #ifdef ENABLE_WASM_SIMD
-    case Wasm::WasmTypes::M128: AssertOrFailFastMsg(UNREACHED, "Wasm.Simd globals not supported");
+    case Wasm::WasmTypes::V128: AssertOrFailFastMsg(UNREACHED, "Wasm.Simd globals not supported");
 #endif
     default:
-        Wasm::WasmTypes::CompileAssertCases<Wasm::WasmTypes::I32, Wasm::WasmTypes::I64, Wasm::WasmTypes::F32, Wasm::WasmTypes::F64, WASM_M128_CHECK_TYPE>();
+        Wasm::WasmTypes::CompileAssertCases<Wasm::WasmTypes::I32, Wasm::WasmTypes::I64, Wasm::WasmTypes::F32, Wasm::WasmTypes::F64, WASM_V128_CHECK_TYPE>();
     }
 }
 

+ 5 - 5
lib/Runtime/Library/WebAssemblyInstance.cpp

@@ -251,11 +251,11 @@ Var WebAssemblyInstance::CreateExportObject(WebAssemblyModule * wasmModule, Scri
                     obj = JavascriptNumber::New(cnst.f64, scriptContext);
                     break;
 #ifdef ENABLE_WASM_SIMD
-                case Wasm::WasmTypes::M128:
-                    JavascriptError::ThrowTypeErrorVar(wasmModule->GetScriptContext(), WASMERR_InvalidTypeConversion, _u("m128"), _u("Var"));
+                case Wasm::WasmTypes::V128:
+                    JavascriptError::ThrowTypeErrorVar(wasmModule->GetScriptContext(), WASMERR_InvalidTypeConversion, _u("v128"), _u("Var"));
 #endif
                 default:
-                    Wasm::WasmTypes::CompileAssertCases<Wasm::WasmTypes::I32, Wasm::WasmTypes::I64, Wasm::WasmTypes::F32, Wasm::WasmTypes::F64, WASM_M128_CHECK_TYPE>();
+                    Wasm::WasmTypes::CompileAssertCases<Wasm::WasmTypes::I32, Wasm::WasmTypes::I64, Wasm::WasmTypes::F32, Wasm::WasmTypes::F64, WASM_V128_CHECK_TYPE>();
                 }
             }
             JavascriptOperators::OP_SetProperty(exportsNamespace, propertyRecord->GetPropertyId(), obj, scriptContext);
@@ -387,10 +387,10 @@ void WebAssemblyInstance::LoadImports(
             case Wasm::WasmTypes::F64: cnst.f64 = JavascriptConversion::ToNumber(prop, ctx); break;
             case Wasm::WasmTypes::I64: Js::JavascriptError::ThrowTypeErrorVar(ctx, WASMERR_InvalidTypeConversion, _u("Var"), _u("i64"));
 #ifdef ENABLE_WASM_SIMD
-            case Wasm::WasmTypes::M128: Js::JavascriptError::ThrowTypeErrorVar(ctx, WASMERR_InvalidTypeConversion, _u("Var"), _u("m128"));
+            case Wasm::WasmTypes::V128: Js::JavascriptError::ThrowTypeErrorVar(ctx, WASMERR_InvalidTypeConversion, _u("Var"), _u("v128"));
 #endif
             default:
-                Wasm::WasmTypes::CompileAssertCases<Wasm::WasmTypes::I32, Wasm::WasmTypes::I64, Wasm::WasmTypes::F32, Wasm::WasmTypes::F64, WASM_M128_CHECK_TYPE>();
+                Wasm::WasmTypes::CompileAssertCases<Wasm::WasmTypes::I32, Wasm::WasmTypes::I64, Wasm::WasmTypes::F32, Wasm::WasmTypes::F64, WASM_V128_CHECK_TYPE>();
             }
             env->SetGlobalValue(global, cnst);
             break;

+ 6 - 6
lib/Runtime/Library/WebAssemblyModule.cpp

@@ -497,11 +497,11 @@ WebAssemblyModule::AttachCustomInOutTracingReader(Wasm::WasmFunctionInfo* func,
         case Wasm::Local::F32: node.op = Wasm::wbPrintF32; break;
         case Wasm::Local::F64: node.op = Wasm::wbPrintF64; break;
 #ifdef ENABLE_WASM_SIMD
-        // todo:: Add support to print m128 argument values
-        case Wasm::WasmTypes::M128: continue;
+        // todo:: Add support to print v128 argument values
+        case Wasm::WasmTypes::V128: continue;
 #endif
         default:
-            Wasm::WasmTypes::CompileAssertCasesNoFailFast<Wasm::WasmTypes::I32, Wasm::WasmTypes::I64, Wasm::WasmTypes::F32, Wasm::WasmTypes::F64, WASM_M128_CHECK_TYPE>();
+            Wasm::WasmTypes::CompileAssertCasesNoFailFast<Wasm::WasmTypes::I32, Wasm::WasmTypes::I64, Wasm::WasmTypes::F32, Wasm::WasmTypes::F64, WASM_V128_CHECK_TYPE>();
             throw Wasm::WasmCompilationException(_u("Unknown param type"));
         }
         customReader->AddNode(node);
@@ -542,11 +542,11 @@ WebAssemblyModule::AttachCustomInOutTracingReader(Wasm::WasmFunctionInfo* func,
         case Wasm::WasmTypes::F32: node.op = Wasm::wbPrintF32; break;
         case Wasm::WasmTypes::F64: node.op = Wasm::wbPrintF64; break;
 #ifdef ENABLE_WASM_SIMD
-        // todo:: Add support to print m128 return values
-        case Wasm::WasmTypes::M128: goto SkipReturnPrint;
+        // todo:: Add support to print v128 return values
+        case Wasm::WasmTypes::V128: goto SkipReturnPrint;
 #endif
         default:
-            Wasm::WasmTypes::CompileAssertCasesNoFailFast<Wasm::WasmTypes::I32, Wasm::WasmTypes::I64, Wasm::WasmTypes::F32, Wasm::WasmTypes::F64, WASM_M128_CHECK_TYPE>();
+            Wasm::WasmTypes::CompileAssertCasesNoFailFast<Wasm::WasmTypes::I32, Wasm::WasmTypes::I64, Wasm::WasmTypes::F32, Wasm::WasmTypes::F64, WASM_V128_CHECK_TYPE>();
             throw Wasm::WasmCompilationException(_u("Unknown return type"));
         }
         customReader->AddNode(node);

+ 150 - 150
lib/WasmReader/WasmBinaryOpcodesSimd.h

@@ -31,159 +31,159 @@
 WASM_PREFIX(Simd, WASM_PREFIX_SIMD, Wasm::Simd::IsEnabled(), "WebAssembly Simd support is not enabled")
 
 //SIMD Signatures
-WASM_SIGNATURE(F_M128, 2, WasmTypes::F32, WasmTypes::M128)
-WASM_SIGNATURE(I_M128, 2, WasmTypes::I32, WasmTypes::M128)
-WASM_SIGNATURE(M128_I, 2, WasmTypes::M128, WasmTypes::I32)
-WASM_SIGNATURE(M128_F, 2, WasmTypes::M128, WasmTypes::F32)
-WASM_SIGNATURE(M128_L, 2, WasmTypes::M128, WasmTypes::I64)
-WASM_SIGNATURE(M128_D, 2, WasmTypes::M128, WasmTypes::F64)
-WASM_SIGNATURE(M128X3, 3, WasmTypes::M128, WasmTypes::M128, WasmTypes::M128)
-WASM_SIGNATURE(M128_M128_I, 3, WasmTypes::M128, WasmTypes::M128, WasmTypes::I32)
-WASM_SIGNATURE(M128_M128, 2, WasmTypes::M128, WasmTypes::M128)
-WASM_SIGNATURE(L_M128, 2, WasmTypes::I64, WasmTypes::M128)
-WASM_SIGNATURE(D_M128_I, 3, WasmTypes::F64, WasmTypes::M128, WasmTypes::I32)
+WASM_SIGNATURE(F_V128, 2, WasmTypes::F32, WasmTypes::V128)
+WASM_SIGNATURE(I_V128, 2, WasmTypes::I32, WasmTypes::V128)
+WASM_SIGNATURE(V128_I, 2, WasmTypes::V128, WasmTypes::I32)
+WASM_SIGNATURE(V128_F, 2, WasmTypes::V128, WasmTypes::F32)
+WASM_SIGNATURE(V128_L, 2, WasmTypes::V128, WasmTypes::I64)
+WASM_SIGNATURE(V128_D, 2, WasmTypes::V128, WasmTypes::F64)
+WASM_SIGNATURE(V128X3, 3, WasmTypes::V128, WasmTypes::V128, WasmTypes::V128)
+WASM_SIGNATURE(V128_V128_I, 3, WasmTypes::V128, WasmTypes::V128, WasmTypes::I32)
+WASM_SIGNATURE(V128_V128, 2, WasmTypes::V128, WasmTypes::V128)
+WASM_SIGNATURE(L_V128, 2, WasmTypes::I64, WasmTypes::V128)
+WASM_SIGNATURE(D_V128_I, 3, WasmTypes::F64, WasmTypes::V128, WasmTypes::I32)
 
 #define __prefix (WASM_PREFIX_SIMD << 8)
-WASM_MISC_OPCODE(M128Const, __prefix | 0x00, Limit, true, "v128.const")
-WASM_SIMD_MEMREAD_OPCODE(M128Load, __prefix | 0x01, M128_I, Simd128_LdArr_F4, Js::ArrayBufferView::TYPE_FLOAT32, 16, true, "v128.load")
-WASM_SIMD_MEMSTORE_OPCODE(M128Store, __prefix | 0x02, M128_I, Simd128_StArr_F4, Js::ArrayBufferView::TYPE_FLOAT32, 16, true, "v128.store")
-WASM_UNARY__OPCODE(I16Splat, __prefix | 0x03, M128_I, Simd128_Splat_I16, true, "i8x16.splat")
-WASM_UNARY__OPCODE(I8Splat, __prefix | 0x04, M128_I, Simd128_Splat_I8, true, "i16x8.splat")
-WASM_UNARY__OPCODE(I4Splat, __prefix | 0x05, M128_I, Simd128_Splat_I4, true, "i32x4.splat")
-WASM_UNARY__OPCODE(I2Splat, __prefix | 0x06, M128_L, Simd128_Splat_I2, true, "i64x2.splat")
-WASM_UNARY__OPCODE(F4Splat, __prefix | 0x07, M128_F, Simd128_Splat_F4, true, "f32x4.splat")
-WASM_UNARY__OPCODE(F2Splat, __prefix | 0x08, M128_D, Simd128_Splat_D2, true, "f64x2.splat")
-WASM_EXTRACTLANE_OPCODE(I16ExtractLaneS, __prefix | 0x09, I_M128, Simd128_ExtractLane_I16, true, "i8x16.extract_lane_s")
-WASM_EXTRACTLANE_OPCODE(I16ExtractLaneU, __prefix | 0x0a, I_M128, Simd128_ExtractLane_U16, true, "i8x16.extract_lane_u")
-WASM_EXTRACTLANE_OPCODE(I8ExtractLaneS, __prefix | 0x0b, I_M128, Simd128_ExtractLane_I8, true, "i16x8.extract_lane_s")
-WASM_EXTRACTLANE_OPCODE(I8ExtractLaneU, __prefix | 0x0c, I_M128, Simd128_ExtractLane_U8, true, "i16x8.extract_lane_u")
-WASM_EXTRACTLANE_OPCODE(I4ExtractLane, __prefix | 0x0d, I_M128, Simd128_ExtractLane_I4, true, "i32x4.extract_lane")
-WASM_EXTRACTLANE_OPCODE(I2ExtractLane, __prefix | 0x0e, L_M128, Simd128_ExtractLane_I2, true, "i64x2.extract_lane")
-WASM_EXTRACTLANE_OPCODE(F4ExtractLane, __prefix | 0x0f, F_M128, Simd128_ExtractLane_F4, true, "f32x4.extract_lane")
-WASM_BINARY_OPCODE(F2ExtractLane, __prefix | 0x10, D_M128_I, Simd128_ExtractLane_D2, true, "f64x2.extract_lane")
-WASM_REPLACELANE_OPCODE(I16ReplaceLane, __prefix | 0x11, M128_I, Simd128_ReplaceLane_I16, true, "i8x16.replace_lane")
-WASM_REPLACELANE_OPCODE(I8ReplaceLane, __prefix | 0x12, M128_I, Simd128_ReplaceLane_I8, true, "i16x8.replace_lane")
-WASM_REPLACELANE_OPCODE(I4ReplaceLane, __prefix | 0x13, M128_I, Simd128_ReplaceLane_I4, true, "i32x4.replace_lane")
-WASM_REPLACELANE_OPCODE(I2ReplaceLane, __prefix | 0x14, M128_L, Simd128_ReplaceLane_I2, true, "i64x2.replace_lane")
-WASM_REPLACELANE_OPCODE(F4ReplaceLane, __prefix | 0x15, M128_F, Simd128_ReplaceLane_F4, true, "f32x4.replace_lane")
-WASM_REPLACELANE_OPCODE(F2ReplaceLane, __prefix | 0x16, M128_D, Simd128_ReplaceLane_D2, true, "f64x2.replace_lane")
+WASM_MISC_OPCODE(V128Const, __prefix | 0x00, Limit, true, "v128.const")
+WASM_SIMD_MEMREAD_OPCODE(V128Load, __prefix | 0x01, V128_I, Simd128_LdArr_F4, Js::ArrayBufferView::TYPE_FLOAT32, 16, true, "v128.load")
+WASM_SIMD_MEMSTORE_OPCODE(V128Store, __prefix | 0x02, V128_I, Simd128_StArr_F4, Js::ArrayBufferView::TYPE_FLOAT32, 16, true, "v128.store")
+WASM_UNARY__OPCODE(I16Splat, __prefix | 0x03, V128_I, Simd128_Splat_I16, true, "i8x16.splat")
+WASM_UNARY__OPCODE(I8Splat, __prefix | 0x04, V128_I, Simd128_Splat_I8, true, "i16x8.splat")
+WASM_UNARY__OPCODE(I4Splat, __prefix | 0x05, V128_I, Simd128_Splat_I4, true, "i32x4.splat")
+WASM_UNARY__OPCODE(I2Splat, __prefix | 0x06, V128_L, Simd128_Splat_I2, true, "i64x2.splat")
+WASM_UNARY__OPCODE(F4Splat, __prefix | 0x07, V128_F, Simd128_Splat_F4, true, "f32x4.splat")
+WASM_UNARY__OPCODE(F2Splat, __prefix | 0x08, V128_D, Simd128_Splat_D2, true, "f64x2.splat")
+WASM_EXTRACTLANE_OPCODE(I16ExtractLaneS, __prefix | 0x09, I_V128, Simd128_ExtractLane_I16, true, "i8x16.extract_lane_s")
+WASM_EXTRACTLANE_OPCODE(I16ExtractLaneU, __prefix | 0x0a, I_V128, Simd128_ExtractLane_U16, true, "i8x16.extract_lane_u")
+WASM_EXTRACTLANE_OPCODE(I8ExtractLaneS, __prefix | 0x0b, I_V128, Simd128_ExtractLane_I8, true, "i16x8.extract_lane_s")
+WASM_EXTRACTLANE_OPCODE(I8ExtractLaneU, __prefix | 0x0c, I_V128, Simd128_ExtractLane_U8, true, "i16x8.extract_lane_u")
+WASM_EXTRACTLANE_OPCODE(I4ExtractLane, __prefix | 0x0d, I_V128, Simd128_ExtractLane_I4, true, "i32x4.extract_lane")
+WASM_EXTRACTLANE_OPCODE(I2ExtractLane, __prefix | 0x0e, L_V128, Simd128_ExtractLane_I2, true, "i64x2.extract_lane")
+WASM_EXTRACTLANE_OPCODE(F4ExtractLane, __prefix | 0x0f, F_V128, Simd128_ExtractLane_F4, true, "f32x4.extract_lane")
+WASM_BINARY_OPCODE(F2ExtractLane, __prefix | 0x10, D_V128_I, Simd128_ExtractLane_D2, true, "f64x2.extract_lane")
+WASM_REPLACELANE_OPCODE(I16ReplaceLane, __prefix | 0x11, V128_I, Simd128_ReplaceLane_I16, true, "i8x16.replace_lane")
+WASM_REPLACELANE_OPCODE(I8ReplaceLane, __prefix | 0x12, V128_I, Simd128_ReplaceLane_I8, true, "i16x8.replace_lane")
+WASM_REPLACELANE_OPCODE(I4ReplaceLane, __prefix | 0x13, V128_I, Simd128_ReplaceLane_I4, true, "i32x4.replace_lane")
+WASM_REPLACELANE_OPCODE(I2ReplaceLane, __prefix | 0x14, V128_L, Simd128_ReplaceLane_I2, true, "i64x2.replace_lane")
+WASM_REPLACELANE_OPCODE(F4ReplaceLane, __prefix | 0x15, V128_F, Simd128_ReplaceLane_F4, true, "f32x4.replace_lane")
+WASM_REPLACELANE_OPCODE(F2ReplaceLane, __prefix | 0x16, V128_D, Simd128_ReplaceLane_D2, true, "f64x2.replace_lane")
 WASM_MISC_OPCODE(V8X16Shuffle, __prefix | 0x17, Limit, true, "v8x16.shuffle")
-WASM_BINARY_OPCODE(I16Add, __prefix | 0x18, M128X3, Simd128_Add_I16, true, "i8x16.add")
-WASM_BINARY_OPCODE(I8Add, __prefix | 0x19, M128X3, Simd128_Add_I8, true, "i16x8.add")
-WASM_BINARY_OPCODE(I4Add, __prefix | 0x1a, M128X3, Simd128_Add_I4, true, "i32x4.add")
-WASM_BINARY_OPCODE(I2Add, __prefix | 0x1b, M128X3, Simd128_Add_I2, true, "i64x2.add")
-WASM_BINARY_OPCODE(I16Sub, __prefix | 0x1c, M128X3, Simd128_Sub_I16, true, "i8x16.sub")
-WASM_BINARY_OPCODE(I8Sub, __prefix | 0x1d, M128X3, Simd128_Sub_I8, true, "i16x8.sub")
-WASM_BINARY_OPCODE(I4Sub, __prefix | 0x1e, M128X3, Simd128_Sub_I4, true, "i32x4.sub")
-WASM_BINARY_OPCODE(I2Sub, __prefix | 0x1f, M128X3, Simd128_Sub_I2, true, "i64x2.sub")
-WASM_BINARY_OPCODE(I16Mul, __prefix | 0x20, M128X3, Simd128_Mul_I16, true, "i8x16.mul")
-WASM_BINARY_OPCODE(I8Mul, __prefix | 0x21, M128X3, Simd128_Mul_I8, true, "i16x8.mul")
-WASM_BINARY_OPCODE(I4Mul, __prefix | 0x22, M128X3, Simd128_Mul_I4, true, "i32x4.mul")
-WASM_UNARY__OPCODE(I16Neg, __prefix | 0x23, M128_M128, Simd128_Neg_I16, true, "i8x16.neg")
-WASM_UNARY__OPCODE(I8Neg, __prefix | 0x24, M128_M128, Simd128_Neg_I8, true, "i16x8.neg")
-WASM_UNARY__OPCODE(I4Neg, __prefix | 0x25, M128_M128, Simd128_Neg_I4, true, "i32x4.neg")
-WASM_UNARY__OPCODE(I2Neg, __prefix | 0x26, M128_M128, Simd128_Neg_I2, true, "i64x2.neg")
-WASM_BINARY_OPCODE(I16AddSaturateS, __prefix | 0x27, M128X3, Simd128_AddSaturate_I16, true, "i8x16.add_saturate_s")
-WASM_BINARY_OPCODE(I16AddSaturateU, __prefix | 0x28, M128X3, Simd128_AddSaturate_U16, true, "i8x16.add_saturate_u")
-WASM_BINARY_OPCODE(I8AddSaturateS, __prefix | 0x29, M128X3, Simd128_AddSaturate_I8, true, "i16x8.add_saturate_s")
-WASM_BINARY_OPCODE(I8AddSaturateU, __prefix | 0x2a, M128X3, Simd128_AddSaturate_U8, true, "i16x8.add_saturate_u")
-WASM_BINARY_OPCODE(I16SubSaturateS, __prefix | 0x2b, M128X3, Simd128_SubSaturate_I16, true, "i8x16.sub_saturate_s")
-WASM_BINARY_OPCODE(I16SubSaturateU, __prefix | 0x2c, M128X3, Simd128_SubSaturate_U16, true, "i8x16.sub_saturate_u")
-WASM_BINARY_OPCODE(I8SubSaturateS, __prefix | 0x2d, M128X3, Simd128_SubSaturate_I8, true, "i16x8.sub_saturate_s")
-WASM_BINARY_OPCODE(I8SubSaturateU, __prefix | 0x2e, M128X3, Simd128_SubSaturate_U8, true, "i16x8.sub_saturate_u")
-WASM_BINARY_OPCODE(I16Shl, __prefix | 0x2f, M128_M128_I, Simd128_ShLtByScalar_I16, true, "i8x16.shl")
-WASM_BINARY_OPCODE(I8Shl, __prefix | 0x30, M128_M128_I, Simd128_ShLtByScalar_I8, true, "i16x8.shl")
-WASM_BINARY_OPCODE(I4Shl, __prefix | 0x31, M128_M128_I, Simd128_ShLtByScalar_I4, true, "i32x4.shl")
-WASM_BINARY_OPCODE(I2Shl, __prefix | 0x32, M128_M128_I, Simd128_ShLtByScalar_I2, true, "i64x2.shl")
-WASM_BINARY_OPCODE(I16ShrS, __prefix | 0x33, M128_M128_I, Simd128_ShRtByScalar_I16, true, "i8x16.shr_s")
-WASM_BINARY_OPCODE(I16ShrU, __prefix | 0x34, M128_M128_I, Simd128_ShRtByScalar_U16, true, "i8x16.shr_u")
-WASM_BINARY_OPCODE(I8ShrS, __prefix | 0x35, M128_M128_I, Simd128_ShRtByScalar_I8, true, "i16x8.shr_s")
-WASM_BINARY_OPCODE(I8ShrU, __prefix | 0x36, M128_M128_I, Simd128_ShRtByScalar_U8, true, "i16x8.shr_u")
-WASM_BINARY_OPCODE(I4ShrS, __prefix | 0x37, M128_M128_I, Simd128_ShRtByScalar_I4, true, "i32x4.shr_s")
-WASM_BINARY_OPCODE(I4ShrU, __prefix | 0x38, M128_M128_I, Simd128_ShRtByScalar_U4, true, "i32x4.shr_u")
-WASM_BINARY_OPCODE(I2ShrS, __prefix | 0x39, M128_M128_I, Simd128_ShRtByScalar_I2, true, "i64x2.shr_s")
-WASM_BINARY_OPCODE(I2ShrU, __prefix | 0x3a, M128_M128_I, Simd128_ShRtByScalar_U2, true, "i64x2.shr_u")
-WASM_BINARY_OPCODE(M128And, __prefix | 0x3b, M128X3, Simd128_And_I4, true, "v128.and")
-WASM_BINARY_OPCODE(M128Or, __prefix | 0x3c, M128X3, Simd128_Or_I4, true, "v128.or")
-WASM_BINARY_OPCODE(M128Xor, __prefix | 0x3d, M128X3, Simd128_Xor_I4, true, "v128.xor")
-WASM_UNARY__OPCODE(M128Not, __prefix | 0x3e, M128_M128, Simd128_Not_I4, true, "v128.not")
-WASM_MISC_OPCODE(M128Bitselect, __prefix | 0x3f, Limit, true, "v128.bitselect")
-WASM_UNARY__OPCODE(I16AnyTrue, __prefix | 0x40, I_M128, Simd128_AnyTrue_B16, true, "i8x16.any_true")
-WASM_UNARY__OPCODE(I8AnyTrue, __prefix | 0x41, I_M128, Simd128_AnyTrue_B8, true, "i16x8.any_true")
-WASM_UNARY__OPCODE(I4AnyTrue, __prefix | 0x42, I_M128, Simd128_AnyTrue_B4, true, "i32x4.any_true")
-WASM_UNARY__OPCODE(I2AnyTrue, __prefix | 0x43, I_M128, Simd128_AnyTrue_B2, true, "i64x2.any_true")
-WASM_UNARY__OPCODE(I16AllTrue, __prefix | 0x44, I_M128, Simd128_AllTrue_B16, true, "i8x16.all_true")
-WASM_UNARY__OPCODE(I8AllTrue, __prefix | 0x45, I_M128, Simd128_AllTrue_B8, true, "i16x8.all_true")
-WASM_UNARY__OPCODE(I4AllTrue, __prefix | 0x46, I_M128, Simd128_AllTrue_B4, true, "i32x4.all_true")
-WASM_UNARY__OPCODE(I2AllTrue, __prefix | 0x47, I_M128, Simd128_AllTrue_B2, true, "i64x2.all_true")
-WASM_BINARY_OPCODE(I16Eq, __prefix | 0x48, M128X3, Simd128_Eq_I16, true, "i8x16.eq")
-WASM_BINARY_OPCODE(I8Eq, __prefix | 0x49, M128X3, Simd128_Eq_I8, true, "i16x8.eq")
-WASM_BINARY_OPCODE(I4Eq, __prefix | 0x4a, M128X3, Simd128_Eq_I4, true, "i32x4.eq")
-WASM_BINARY_OPCODE(F4Eq, __prefix | 0x4b, M128X3, Simd128_Eq_F4, true, "f32x4.eq")
-WASM_BINARY_OPCODE(F2Eq, __prefix | 0x4c, M128X3, Simd128_Eq_D2, true, "f64x2.eq")
-WASM_BINARY_OPCODE(I16Ne, __prefix | 0x4d, M128X3, Simd128_Neq_I16, true, "i8x16.ne")
-WASM_BINARY_OPCODE(I8Ne, __prefix | 0x4e, M128X3, Simd128_Neq_I8, true, "i16x8.ne")
-WASM_BINARY_OPCODE(I4Ne, __prefix | 0x4f, M128X3, Simd128_Neq_I4, true, "i32x4.ne")
-WASM_BINARY_OPCODE(F4Ne, __prefix | 0x50, M128X3, Simd128_Neq_F4, true, "f32x4.ne")
-WASM_BINARY_OPCODE(F2Ne, __prefix | 0x51, M128X3, Simd128_Neq_D2, true, "f64x2.ne")
-WASM_BINARY_OPCODE(I16LtS, __prefix | 0x52, M128X3, Simd128_Lt_I16, true, "i8x16.lt_s")
-WASM_BINARY_OPCODE(I16LtU, __prefix | 0x53, M128X3, Simd128_Lt_U16, true, "i8x16.lt_u")
-WASM_BINARY_OPCODE(I8LtS, __prefix | 0x54, M128X3, Simd128_Lt_I8, true, "i16x8.lt_s")
-WASM_BINARY_OPCODE(I8LtU, __prefix | 0x55, M128X3, Simd128_Lt_U8, true, "i16x8.lt_u")
-WASM_BINARY_OPCODE(I4LtS, __prefix | 0x56, M128X3, Simd128_Lt_I4, true, "i32x4.lt_s")
-WASM_BINARY_OPCODE(I4LtU, __prefix | 0x57, M128X3, Simd128_Lt_U4, true, "i32x4.lt_u")
-WASM_BINARY_OPCODE(F4Lt, __prefix | 0x58, M128X3, Simd128_Lt_F4, true, "f32x4.lt")
-WASM_BINARY_OPCODE(F2Lt, __prefix | 0x59, M128X3, Simd128_Lt_D2, true, "f64x2.lt")
-WASM_BINARY_OPCODE(I16LeS, __prefix | 0x5a, M128X3, Simd128_LtEq_I16, true, "i8x16.le_s")
-WASM_BINARY_OPCODE(I16LeU, __prefix | 0x5b, M128X3, Simd128_LtEq_U16, true, "i8x16.le_u")
-WASM_BINARY_OPCODE(I8LeS, __prefix | 0x5c, M128X3, Simd128_LtEq_I8, true, "i16x8.le_s")
-WASM_BINARY_OPCODE(I8LeU, __prefix | 0x5d, M128X3, Simd128_LtEq_U8, true, "i16x8.le_u")
-WASM_BINARY_OPCODE(I4LeS, __prefix | 0x5e, M128X3, Simd128_LtEq_I4, true, "i32x4.le_s")
-WASM_BINARY_OPCODE(I4LeU, __prefix | 0x5f, M128X3, Simd128_LtEq_U4, true, "i32x4.le_u")
-WASM_BINARY_OPCODE(F4Le, __prefix | 0x60, M128X3, Simd128_LtEq_F4, true, "f32x4.le")
-WASM_BINARY_OPCODE(F2Le, __prefix | 0x61, M128X3, Simd128_LtEq_D2, true, "f64x2.le")
-WASM_BINARY_OPCODE(I16GtS, __prefix | 0x62, M128X3, Simd128_Gt_I16, true, "i8x16.gt_s")
-WASM_BINARY_OPCODE(I16GtU, __prefix | 0x63, M128X3, Simd128_Gt_U16, true, "i8x16.gt_u")
-WASM_BINARY_OPCODE(I8GtS, __prefix | 0x64, M128X3, Simd128_Gt_I8, true, "i16x8.gt_s")
-WASM_BINARY_OPCODE(I8GtU, __prefix | 0x65, M128X3, Simd128_Gt_U8, true, "i16x8.gt_u")
-WASM_BINARY_OPCODE(I4GtS, __prefix | 0x66, M128X3, Simd128_Gt_I4, true, "i32x4.gt_s")
-WASM_BINARY_OPCODE(I4GtU, __prefix | 0x67, M128X3, Simd128_Gt_U4, true, "i32x4.gt_u")
-WASM_BINARY_OPCODE(F4Gt, __prefix | 0x68, M128X3, Simd128_Gt_F4, true, "f32x4.gt")
-WASM_BINARY_OPCODE(F2Gt, __prefix | 0x69, M128X3, Simd128_Gt_D2, true, "f64x2.gt")
-WASM_BINARY_OPCODE(I16GeS, __prefix | 0x6a, M128X3, Simd128_GtEq_I16, true, "i8x16.ge_s")
-WASM_BINARY_OPCODE(I16GeU, __prefix | 0x6b, M128X3, Simd128_GtEq_U16, true, "i8x16.ge_u")
-WASM_BINARY_OPCODE(I8GeS, __prefix | 0x6c, M128X3, Simd128_GtEq_I8, true, "i16x8.ge_s")
-WASM_BINARY_OPCODE(I8GeU, __prefix | 0x6d, M128X3, Simd128_GtEq_U8, true, "i16x8.ge_u")
-WASM_BINARY_OPCODE(I4GeS, __prefix | 0x6e, M128X3, Simd128_GtEq_I4, true, "i32x4.ge_s")
-WASM_BINARY_OPCODE(I4GeU, __prefix | 0x6f, M128X3, Simd128_GtEq_U4, true, "i32x4.ge_u")
-WASM_BINARY_OPCODE(F4Ge, __prefix | 0x70, M128X3, Simd128_GtEq_F4, true, "f32x4.ge")
-WASM_BINARY_OPCODE(F2Ge, __prefix | 0x71, M128X3, Simd128_GtEq_D2, true, "f64x2.ge")
-WASM_UNARY__OPCODE(F4Neg, __prefix | 0x72, M128_M128, Simd128_Neg_F4, true, "f32x4.neg")
-WASM_UNARY__OPCODE(F2Neg, __prefix | 0x73, M128_M128, Simd128_Neg_D2, true, "f64x2.neg")
-WASM_UNARY__OPCODE(F4Abs, __prefix | 0x74, M128_M128, Simd128_Abs_F4, true, "f32x4.abs")
-WASM_UNARY__OPCODE(F2Abs, __prefix | 0x75, M128_M128, Simd128_Abs_D2, true, "f64x2.abs")
-WASM_BINARY_OPCODE(F4Min, __prefix | 0x76, M128X3, Simd128_Min_F4, true, "f32x4.min")
-WASM_BINARY_OPCODE(F2Min, __prefix | 0x77, M128X3, Simd128_Min_D2, true, "f64x2.min")
-WASM_BINARY_OPCODE(F4Max, __prefix | 0x78, M128X3, Simd128_Max_F4, true, "f32x4.max")
-WASM_BINARY_OPCODE(F2Max, __prefix | 0x79, M128X3, Simd128_Max_D2, true, "f64x2.max")
-WASM_BINARY_OPCODE(F4Add, __prefix | 0x7a, M128X3, Simd128_Add_F4, true, "f32x4.add")
-WASM_BINARY_OPCODE(F2Add, __prefix | 0x7b, M128X3, Simd128_Add_D2, true, "f64x2.add")
-WASM_BINARY_OPCODE(F4Sub, __prefix | 0x7c, M128X3, Simd128_Sub_F4, true, "f32x4.sub")
-WASM_BINARY_OPCODE(F2Sub, __prefix | 0x7d, M128X3, Simd128_Sub_D2, true, "f64x2.sub")
-WASM_BINARY_OPCODE(F4Div, __prefix | 0x7e, M128X3, Simd128_Div_F4, true, "f32x4.div")
-WASM_BINARY_OPCODE(F2Div, __prefix | 0x7f, M128X3, Simd128_Div_D2, true, "f64x2.div")
-WASM_BINARY_OPCODE(F4Mul, __prefix | 0x80, M128X3, Simd128_Mul_F4, true, "f32x4.mul")
-WASM_BINARY_OPCODE(F2Mul, __prefix | 0x81, M128X3, Simd128_Mul_D2, true, "f64x2.mul")
-WASM_UNARY__OPCODE(F4Sqrt, __prefix | 0x82, M128_M128, Simd128_Sqrt_F4, true, "f32x4.sqrt")
-WASM_UNARY__OPCODE(F2Sqrt, __prefix | 0x83, M128_M128, Simd128_Sqrt_D2, true, "f64x2.sqrt")
-WASM_UNARY__OPCODE(F4ConvertS, __prefix | 0x84, M128_M128, Simd128_FromInt32x4_F4, true, "f32x4.convert_s/i32x4")
-WASM_UNARY__OPCODE(F4ConvertU, __prefix | 0x85, M128_M128, Simd128_FromUint32x4_F4, true, "f32x4.convert_u/i32x4")
-WASM_UNARY__OPCODE(F2ConvertS, __prefix | 0x86, M128_M128, Simd128_FromInt64x2_D2, true, "f64x2.convert_s/i64x2")
-WASM_UNARY__OPCODE(F2ConvertU, __prefix | 0x87, M128_M128, Simd128_FromUint64x2_D2, true, "f64x2.convert_u/i64x2")
-WASM_UNARY__OPCODE(I4TruncS, __prefix | 0x88, M128_M128, Simd128_FromFloat32x4_I4, true, "i32x4.trunc_s/f32x4:sat")
-WASM_UNARY__OPCODE(I4TruncU, __prefix | 0x89, M128_M128, Simd128_FromFloat32x4_U4, true, "i32x4.trunc_u/f32x4:sat")
-WASM_UNARY__OPCODE(I2TruncS, __prefix | 0x8a, M128_M128, Simd128_FromFloat64x2_I2, true, "i64x2.trunc_s/f64x2:sat")
-WASM_UNARY__OPCODE(I2TruncU, __prefix | 0x8b, M128_M128, Simd128_FromFloat64x2_U2, true, "i64x2.trunc_u/f64x2:sat")
+WASM_BINARY_OPCODE(I16Add, __prefix | 0x18, V128X3, Simd128_Add_I16, true, "i8x16.add")
+WASM_BINARY_OPCODE(I8Add, __prefix | 0x19, V128X3, Simd128_Add_I8, true, "i16x8.add")
+WASM_BINARY_OPCODE(I4Add, __prefix | 0x1a, V128X3, Simd128_Add_I4, true, "i32x4.add")
+WASM_BINARY_OPCODE(I2Add, __prefix | 0x1b, V128X3, Simd128_Add_I2, true, "i64x2.add")
+WASM_BINARY_OPCODE(I16Sub, __prefix | 0x1c, V128X3, Simd128_Sub_I16, true, "i8x16.sub")
+WASM_BINARY_OPCODE(I8Sub, __prefix | 0x1d, V128X3, Simd128_Sub_I8, true, "i16x8.sub")
+WASM_BINARY_OPCODE(I4Sub, __prefix | 0x1e, V128X3, Simd128_Sub_I4, true, "i32x4.sub")
+WASM_BINARY_OPCODE(I2Sub, __prefix | 0x1f, V128X3, Simd128_Sub_I2, true, "i64x2.sub")
+WASM_BINARY_OPCODE(I16Mul, __prefix | 0x20, V128X3, Simd128_Mul_I16, true, "i8x16.mul")
+WASM_BINARY_OPCODE(I8Mul, __prefix | 0x21, V128X3, Simd128_Mul_I8, true, "i16x8.mul")
+WASM_BINARY_OPCODE(I4Mul, __prefix | 0x22, V128X3, Simd128_Mul_I4, true, "i32x4.mul")
+WASM_UNARY__OPCODE(I16Neg, __prefix | 0x23, V128_V128, Simd128_Neg_I16, true, "i8x16.neg")
+WASM_UNARY__OPCODE(I8Neg, __prefix | 0x24, V128_V128, Simd128_Neg_I8, true, "i16x8.neg")
+WASM_UNARY__OPCODE(I4Neg, __prefix | 0x25, V128_V128, Simd128_Neg_I4, true, "i32x4.neg")
+WASM_UNARY__OPCODE(I2Neg, __prefix | 0x26, V128_V128, Simd128_Neg_I2, true, "i64x2.neg")
+WASM_BINARY_OPCODE(I16AddSaturateS, __prefix | 0x27, V128X3, Simd128_AddSaturate_I16, true, "i8x16.add_saturate_s")
+WASM_BINARY_OPCODE(I16AddSaturateU, __prefix | 0x28, V128X3, Simd128_AddSaturate_U16, true, "i8x16.add_saturate_u")
+WASM_BINARY_OPCODE(I8AddSaturateS, __prefix | 0x29, V128X3, Simd128_AddSaturate_I8, true, "i16x8.add_saturate_s")
+WASM_BINARY_OPCODE(I8AddSaturateU, __prefix | 0x2a, V128X3, Simd128_AddSaturate_U8, true, "i16x8.add_saturate_u")
+WASM_BINARY_OPCODE(I16SubSaturateS, __prefix | 0x2b, V128X3, Simd128_SubSaturate_I16, true, "i8x16.sub_saturate_s")
+WASM_BINARY_OPCODE(I16SubSaturateU, __prefix | 0x2c, V128X3, Simd128_SubSaturate_U16, true, "i8x16.sub_saturate_u")
+WASM_BINARY_OPCODE(I8SubSaturateS, __prefix | 0x2d, V128X3, Simd128_SubSaturate_I8, true, "i16x8.sub_saturate_s")
+WASM_BINARY_OPCODE(I8SubSaturateU, __prefix | 0x2e, V128X3, Simd128_SubSaturate_U8, true, "i16x8.sub_saturate_u")
+WASM_BINARY_OPCODE(I16Shl, __prefix | 0x2f, V128_V128_I, Simd128_ShLtByScalar_I16, true, "i8x16.shl")
+WASM_BINARY_OPCODE(I8Shl, __prefix | 0x30, V128_V128_I, Simd128_ShLtByScalar_I8, true, "i16x8.shl")
+WASM_BINARY_OPCODE(I4Shl, __prefix | 0x31, V128_V128_I, Simd128_ShLtByScalar_I4, true, "i32x4.shl")
+WASM_BINARY_OPCODE(I2Shl, __prefix | 0x32, V128_V128_I, Simd128_ShLtByScalar_I2, true, "i64x2.shl")
+WASM_BINARY_OPCODE(I16ShrS, __prefix | 0x33, V128_V128_I, Simd128_ShRtByScalar_I16, true, "i8x16.shr_s")
+WASM_BINARY_OPCODE(I16ShrU, __prefix | 0x34, V128_V128_I, Simd128_ShRtByScalar_U16, true, "i8x16.shr_u")
+WASM_BINARY_OPCODE(I8ShrS, __prefix | 0x35, V128_V128_I, Simd128_ShRtByScalar_I8, true, "i16x8.shr_s")
+WASM_BINARY_OPCODE(I8ShrU, __prefix | 0x36, V128_V128_I, Simd128_ShRtByScalar_U8, true, "i16x8.shr_u")
+WASM_BINARY_OPCODE(I4ShrS, __prefix | 0x37, V128_V128_I, Simd128_ShRtByScalar_I4, true, "i32x4.shr_s")
+WASM_BINARY_OPCODE(I4ShrU, __prefix | 0x38, V128_V128_I, Simd128_ShRtByScalar_U4, true, "i32x4.shr_u")
+WASM_BINARY_OPCODE(I2ShrS, __prefix | 0x39, V128_V128_I, Simd128_ShRtByScalar_I2, true, "i64x2.shr_s")
+WASM_BINARY_OPCODE(I2ShrU, __prefix | 0x3a, V128_V128_I, Simd128_ShRtByScalar_U2, true, "i64x2.shr_u")
+WASM_BINARY_OPCODE(V128And, __prefix | 0x3b, V128X3, Simd128_And_I4, true, "v128.and")
+WASM_BINARY_OPCODE(V128Or, __prefix | 0x3c, V128X3, Simd128_Or_I4, true, "v128.or")
+WASM_BINARY_OPCODE(V128Xor, __prefix | 0x3d, V128X3, Simd128_Xor_I4, true, "v128.xor")
+WASM_UNARY__OPCODE(V128Not, __prefix | 0x3e, V128_V128, Simd128_Not_I4, true, "v128.not")
+WASM_MISC_OPCODE(V128Bitselect, __prefix | 0x3f, Limit, true, "v128.bitselect")
+WASM_UNARY__OPCODE(I16AnyTrue, __prefix | 0x40, I_V128, Simd128_AnyTrue_B16, true, "i8x16.any_true")
+WASM_UNARY__OPCODE(I8AnyTrue, __prefix | 0x41, I_V128, Simd128_AnyTrue_B8, true, "i16x8.any_true")
+WASM_UNARY__OPCODE(I4AnyTrue, __prefix | 0x42, I_V128, Simd128_AnyTrue_B4, true, "i32x4.any_true")
+WASM_UNARY__OPCODE(I2AnyTrue, __prefix | 0x43, I_V128, Simd128_AnyTrue_B2, true, "i64x2.any_true")
+WASM_UNARY__OPCODE(I16AllTrue, __prefix | 0x44, I_V128, Simd128_AllTrue_B16, true, "i8x16.all_true")
+WASM_UNARY__OPCODE(I8AllTrue, __prefix | 0x45, I_V128, Simd128_AllTrue_B8, true, "i16x8.all_true")
+WASM_UNARY__OPCODE(I4AllTrue, __prefix | 0x46, I_V128, Simd128_AllTrue_B4, true, "i32x4.all_true")
+WASM_UNARY__OPCODE(I2AllTrue, __prefix | 0x47, I_V128, Simd128_AllTrue_B2, true, "i64x2.all_true")
+WASM_BINARY_OPCODE(I16Eq, __prefix | 0x48, V128X3, Simd128_Eq_I16, true, "i8x16.eq")
+WASM_BINARY_OPCODE(I8Eq, __prefix | 0x49, V128X3, Simd128_Eq_I8, true, "i16x8.eq")
+WASM_BINARY_OPCODE(I4Eq, __prefix | 0x4a, V128X3, Simd128_Eq_I4, true, "i32x4.eq")
+WASM_BINARY_OPCODE(F4Eq, __prefix | 0x4b, V128X3, Simd128_Eq_F4, true, "f32x4.eq")
+WASM_BINARY_OPCODE(F2Eq, __prefix | 0x4c, V128X3, Simd128_Eq_D2, true, "f64x2.eq")
+WASM_BINARY_OPCODE(I16Ne, __prefix | 0x4d, V128X3, Simd128_Neq_I16, true, "i8x16.ne")
+WASM_BINARY_OPCODE(I8Ne, __prefix | 0x4e, V128X3, Simd128_Neq_I8, true, "i16x8.ne")
+WASM_BINARY_OPCODE(I4Ne, __prefix | 0x4f, V128X3, Simd128_Neq_I4, true, "i32x4.ne")
+WASM_BINARY_OPCODE(F4Ne, __prefix | 0x50, V128X3, Simd128_Neq_F4, true, "f32x4.ne")
+WASM_BINARY_OPCODE(F2Ne, __prefix | 0x51, V128X3, Simd128_Neq_D2, true, "f64x2.ne")
+WASM_BINARY_OPCODE(I16LtS, __prefix | 0x52, V128X3, Simd128_Lt_I16, true, "i8x16.lt_s")
+WASM_BINARY_OPCODE(I16LtU, __prefix | 0x53, V128X3, Simd128_Lt_U16, true, "i8x16.lt_u")
+WASM_BINARY_OPCODE(I8LtS, __prefix | 0x54, V128X3, Simd128_Lt_I8, true, "i16x8.lt_s")
+WASM_BINARY_OPCODE(I8LtU, __prefix | 0x55, V128X3, Simd128_Lt_U8, true, "i16x8.lt_u")
+WASM_BINARY_OPCODE(I4LtS, __prefix | 0x56, V128X3, Simd128_Lt_I4, true, "i32x4.lt_s")
+WASM_BINARY_OPCODE(I4LtU, __prefix | 0x57, V128X3, Simd128_Lt_U4, true, "i32x4.lt_u")
+WASM_BINARY_OPCODE(F4Lt, __prefix | 0x58, V128X3, Simd128_Lt_F4, true, "f32x4.lt")
+WASM_BINARY_OPCODE(F2Lt, __prefix | 0x59, V128X3, Simd128_Lt_D2, true, "f64x2.lt")
+WASM_BINARY_OPCODE(I16LeS, __prefix | 0x5a, V128X3, Simd128_LtEq_I16, true, "i8x16.le_s")
+WASM_BINARY_OPCODE(I16LeU, __prefix | 0x5b, V128X3, Simd128_LtEq_U16, true, "i8x16.le_u")
+WASM_BINARY_OPCODE(I8LeS, __prefix | 0x5c, V128X3, Simd128_LtEq_I8, true, "i16x8.le_s")
+WASM_BINARY_OPCODE(I8LeU, __prefix | 0x5d, V128X3, Simd128_LtEq_U8, true, "i16x8.le_u")
+WASM_BINARY_OPCODE(I4LeS, __prefix | 0x5e, V128X3, Simd128_LtEq_I4, true, "i32x4.le_s")
+WASM_BINARY_OPCODE(I4LeU, __prefix | 0x5f, V128X3, Simd128_LtEq_U4, true, "i32x4.le_u")
+WASM_BINARY_OPCODE(F4Le, __prefix | 0x60, V128X3, Simd128_LtEq_F4, true, "f32x4.le")
+WASM_BINARY_OPCODE(F2Le, __prefix | 0x61, V128X3, Simd128_LtEq_D2, true, "f64x2.le")
+WASM_BINARY_OPCODE(I16GtS, __prefix | 0x62, V128X3, Simd128_Gt_I16, true, "i8x16.gt_s")
+WASM_BINARY_OPCODE(I16GtU, __prefix | 0x63, V128X3, Simd128_Gt_U16, true, "i8x16.gt_u")
+WASM_BINARY_OPCODE(I8GtS, __prefix | 0x64, V128X3, Simd128_Gt_I8, true, "i16x8.gt_s")
+WASM_BINARY_OPCODE(I8GtU, __prefix | 0x65, V128X3, Simd128_Gt_U8, true, "i16x8.gt_u")
+WASM_BINARY_OPCODE(I4GtS, __prefix | 0x66, V128X3, Simd128_Gt_I4, true, "i32x4.gt_s")
+WASM_BINARY_OPCODE(I4GtU, __prefix | 0x67, V128X3, Simd128_Gt_U4, true, "i32x4.gt_u")
+WASM_BINARY_OPCODE(F4Gt, __prefix | 0x68, V128X3, Simd128_Gt_F4, true, "f32x4.gt")
+WASM_BINARY_OPCODE(F2Gt, __prefix | 0x69, V128X3, Simd128_Gt_D2, true, "f64x2.gt")
+WASM_BINARY_OPCODE(I16GeS, __prefix | 0x6a, V128X3, Simd128_GtEq_I16, true, "i8x16.ge_s")
+WASM_BINARY_OPCODE(I16GeU, __prefix | 0x6b, V128X3, Simd128_GtEq_U16, true, "i8x16.ge_u")
+WASM_BINARY_OPCODE(I8GeS, __prefix | 0x6c, V128X3, Simd128_GtEq_I8, true, "i16x8.ge_s")
+WASM_BINARY_OPCODE(I8GeU, __prefix | 0x6d, V128X3, Simd128_GtEq_U8, true, "i16x8.ge_u")
+WASM_BINARY_OPCODE(I4GeS, __prefix | 0x6e, V128X3, Simd128_GtEq_I4, true, "i32x4.ge_s")
+WASM_BINARY_OPCODE(I4GeU, __prefix | 0x6f, V128X3, Simd128_GtEq_U4, true, "i32x4.ge_u")
+WASM_BINARY_OPCODE(F4Ge, __prefix | 0x70, V128X3, Simd128_GtEq_F4, true, "f32x4.ge")
+WASM_BINARY_OPCODE(F2Ge, __prefix | 0x71, V128X3, Simd128_GtEq_D2, true, "f64x2.ge")
+WASM_UNARY__OPCODE(F4Neg, __prefix | 0x72, V128_V128, Simd128_Neg_F4, true, "f32x4.neg")
+WASM_UNARY__OPCODE(F2Neg, __prefix | 0x73, V128_V128, Simd128_Neg_D2, true, "f64x2.neg")
+WASM_UNARY__OPCODE(F4Abs, __prefix | 0x74, V128_V128, Simd128_Abs_F4, true, "f32x4.abs")
+WASM_UNARY__OPCODE(F2Abs, __prefix | 0x75, V128_V128, Simd128_Abs_D2, true, "f64x2.abs")
+WASM_BINARY_OPCODE(F4Min, __prefix | 0x76, V128X3, Simd128_Min_F4, true, "f32x4.min")
+WASM_BINARY_OPCODE(F2Min, __prefix | 0x77, V128X3, Simd128_Min_D2, true, "f64x2.min")
+WASM_BINARY_OPCODE(F4Max, __prefix | 0x78, V128X3, Simd128_Max_F4, true, "f32x4.max")
+WASM_BINARY_OPCODE(F2Max, __prefix | 0x79, V128X3, Simd128_Max_D2, true, "f64x2.max")
+WASM_BINARY_OPCODE(F4Add, __prefix | 0x7a, V128X3, Simd128_Add_F4, true, "f32x4.add")
+WASM_BINARY_OPCODE(F2Add, __prefix | 0x7b, V128X3, Simd128_Add_D2, true, "f64x2.add")
+WASM_BINARY_OPCODE(F4Sub, __prefix | 0x7c, V128X3, Simd128_Sub_F4, true, "f32x4.sub")
+WASM_BINARY_OPCODE(F2Sub, __prefix | 0x7d, V128X3, Simd128_Sub_D2, true, "f64x2.sub")
+WASM_BINARY_OPCODE(F4Div, __prefix | 0x7e, V128X3, Simd128_Div_F4, true, "f32x4.div")
+WASM_BINARY_OPCODE(F2Div, __prefix | 0x7f, V128X3, Simd128_Div_D2, true, "f64x2.div")
+WASM_BINARY_OPCODE(F4Mul, __prefix | 0x80, V128X3, Simd128_Mul_F4, true, "f32x4.mul")
+WASM_BINARY_OPCODE(F2Mul, __prefix | 0x81, V128X3, Simd128_Mul_D2, true, "f64x2.mul")
+WASM_UNARY__OPCODE(F4Sqrt, __prefix | 0x82, V128_V128, Simd128_Sqrt_F4, true, "f32x4.sqrt")
+WASM_UNARY__OPCODE(F2Sqrt, __prefix | 0x83, V128_V128, Simd128_Sqrt_D2, true, "f64x2.sqrt")
+WASM_UNARY__OPCODE(F4ConvertS, __prefix | 0x84, V128_V128, Simd128_FromInt32x4_F4, true, "f32x4.convert_s/i32x4")
+WASM_UNARY__OPCODE(F4ConvertU, __prefix | 0x85, V128_V128, Simd128_FromUint32x4_F4, true, "f32x4.convert_u/i32x4")
+WASM_UNARY__OPCODE(F2ConvertS, __prefix | 0x86, V128_V128, Simd128_FromInt64x2_D2, true, "f64x2.convert_s/i64x2")
+WASM_UNARY__OPCODE(F2ConvertU, __prefix | 0x87, V128_V128, Simd128_FromUint64x2_D2, true, "f64x2.convert_u/i64x2")
+WASM_UNARY__OPCODE(I4TruncS, __prefix | 0x88, V128_V128, Simd128_FromFloat32x4_I4, true, "i32x4.trunc_s/f32x4:sat")
+WASM_UNARY__OPCODE(I4TruncU, __prefix | 0x89, V128_V128, Simd128_FromFloat32x4_U4, true, "i32x4.trunc_u/f32x4:sat")
+WASM_UNARY__OPCODE(I2TruncS, __prefix | 0x8a, V128_V128, Simd128_FromFloat64x2_I2, true, "i64x2.trunc_s/f64x2:sat")
+WASM_UNARY__OPCODE(I2TruncU, __prefix | 0x8b, V128_V128, Simd128_FromFloat64x2_U2, true, "i64x2.trunc_u/f64x2:sat")
 
 #undef __prefix
 #undef WASM_PREFIX_SIMD

+ 6 - 6
lib/WasmReader/WasmBinaryReader.cpp

@@ -420,8 +420,8 @@ WasmOp WasmBinaryReader::ReadExpr()
         ConstNode<WasmTypes::F64>();
         break;
 #ifdef ENABLE_WASM_SIMD
-    case wbM128Const:
-        ConstNode<WasmTypes::M128>();
+    case wbV128Const:
+        ConstNode<WasmTypes::V128>();
         break;
 #endif
     case wbSetLocal:
@@ -683,7 +683,7 @@ void WasmBinaryReader::ConstNode()
         m_funcState.count += sizeof(double);
         break;
 #ifdef ENABLE_WASM_SIMD
-    case WasmTypes::M128:
+    case WasmTypes::V128:
         Simd::EnsureSimdIsEnabled();
         for (uint i = 0; i < Simd::VEC_WIDTH; i++) 
         {
@@ -693,7 +693,7 @@ void WasmBinaryReader::ConstNode()
         break;
 #endif
     default:
-        WasmTypes::CompileAssertCases<Wasm::WasmTypes::I32, Wasm::WasmTypes::I64, Wasm::WasmTypes::F32, Wasm::WasmTypes::F64, WASM_M128_CHECK_TYPE>();
+        WasmTypes::CompileAssertCases<Wasm::WasmTypes::I32, Wasm::WasmTypes::I64, Wasm::WasmTypes::F32, Wasm::WasmTypes::F64, WASM_V128_CHECK_TYPE>();
     }
 }
 
@@ -1079,10 +1079,10 @@ void WasmBinaryReader::ReadGlobalSection()
         case WasmTypes::F32: break; // Handled
         case WasmTypes::F64: break; // Handled
 #ifdef ENABLE_WASM_SIMD
-        case WasmTypes::M128: ThrowDecodingError(_u("m128 globals not supported"));
+        case WasmTypes::V128: ThrowDecodingError(_u("v128 globals not supported"));
 #endif
         default:
-            WasmTypes::CompileAssertCases<WasmTypes::I32, WasmTypes::I64, WasmTypes::F32, WasmTypes::F64, WASM_M128_CHECK_TYPE>();
+            WasmTypes::CompileAssertCases<WasmTypes::I32, WasmTypes::I64, WasmTypes::F32, WasmTypes::F64, WASM_V128_CHECK_TYPE>();
         }
         
         bool isMutable = ReadMutableValue();

+ 1 - 1
lib/WasmReader/WasmBinaryReader.h

@@ -14,7 +14,7 @@ namespace Wasm
         const int8 i64 = -0x2;
         const int8 f32 = -0x3;
         const int8 f64 = -0x4;
-        const int8 m128 = -0x5;
+        const int8 v128 = -0x5;
         const int8 anyfunc = -0x10;
         const int8 func = -0x20;
         const int8 emptyBlock = -0x40;

+ 35 - 36
lib/WasmReader/WasmByteCodeGenerator.cpp

@@ -204,12 +204,12 @@ Js::AsmJsRetType WasmToAsmJs::GetAsmJsReturnType(WasmTypes::WasmType wasmType)
     case WasmTypes::F64: return Js::AsmJsRetType::Double;
     case WasmTypes::Void: return Js::AsmJsRetType::Void;
 #ifdef ENABLE_WASM_SIMD
-    case WasmTypes::M128:
+    case WasmTypes::V128:
         Simd::EnsureSimdIsEnabled();
         return Js::AsmJsRetType::Float32x4;
 #endif
     default:
-        WasmTypes::CompileAssertCasesNoFailFast<WasmTypes::I32, WasmTypes::I64, WasmTypes::F32, WasmTypes::F64, WASM_M128_CHECK_TYPE>();
+        WasmTypes::CompileAssertCasesNoFailFast<WasmTypes::I32, WasmTypes::I64, WasmTypes::F32, WasmTypes::F64, WASM_V128_CHECK_TYPE>();
         throw WasmCompilationException(_u("Unknown return type %u"), wasmType);
     }
 }
@@ -225,12 +225,12 @@ Js::AsmJsVarType WasmToAsmJs::GetAsmJsVarType(WasmTypes::WasmType wasmType)
     case WasmTypes::F32: return Js::AsmJsVarType::Float;
     case WasmTypes::F64: return Js::AsmJsVarType::Double;
 #ifdef ENABLE_WASM_SIMD
-    case WasmTypes::M128:
+    case WasmTypes::V128:
         Simd::EnsureSimdIsEnabled();
         return Js::AsmJsVarType::Float32x4;
 #endif
     default:
-        WasmTypes::CompileAssertCasesNoFailFast<WasmTypes::I32, WasmTypes::I64, WasmTypes::F32, WasmTypes::F64, WASM_M128_CHECK_TYPE>();
+        WasmTypes::CompileAssertCasesNoFailFast<WasmTypes::I32, WasmTypes::I64, WasmTypes::F32, WasmTypes::F64, WASM_V128_CHECK_TYPE>();
         throw WasmCompilationException(_u("Unknown var type %u"), wasmType);
     }
 }
@@ -631,7 +631,7 @@ void WasmBytecodeGenerator::EnregisterLocals()
                 m_writer->AsmLong1Const1(Js::OpCodeAsmJs::Ld_LongConst, m_locals[i].location, 0);
                 break;
 #ifdef ENABLE_WASM_SIMD
-            case WasmTypes::M128:
+            case WasmTypes::V128:
             {
                 Simd::EnsureSimdIsEnabled();
                 m_writer->WasmSimdConst(Js::OpCodeAsmJs::Simd128_LdC, m_locals[i].location, 0, 0, 0, 0);
@@ -730,9 +730,9 @@ void WasmBytecodeGenerator::EmitExpr(WasmOp op)
         info = EmitConst(WasmTypes::I64, GetReader()->m_currentNode.cnst);
         break;
 #ifdef ENABLE_WASM_SIMD
-    case wbM128Const:
+    case wbV128Const:
         Simd::EnsureSimdIsEnabled();
-        info = EmitConst(WasmTypes::M128, GetReader()->m_currentNode.cnst);
+        info = EmitConst(WasmTypes::V128, GetReader()->m_currentNode.cnst);
         break;
 #endif
     case wbBlock:
@@ -792,9 +792,9 @@ void WasmBytecodeGenerator::EmitExpr(WasmOp op)
         info = EmitInfo(WasmTypes::Any);
         break;
 #ifdef ENABLE_WASM_SIMD
-    case wbM128Bitselect:
+    case wbV128Bitselect:
         Simd::EnsureSimdIsEnabled();
-        info = EmitM128BitSelect();
+        info = EmitV128BitSelect();
         break;
     case wbV8X16Shuffle:
         Simd::EnsureSimdIsEnabled();
@@ -999,7 +999,7 @@ void WasmBytecodeGenerator::EmitLoadConst(EmitInfo dst, WasmConstLitNode cnst)
         m_writer->AsmLong1Const1(Js::OpCodeAsmJs::Ld_LongConst, dst.location, cnst.i64);
         break;
 #ifdef ENABLE_WASM_SIMD
-    case WasmTypes::M128:
+    case WasmTypes::V128:
     {
         Simd::EnsureSimdIsEnabled();
         m_writer->WasmSimdConst(Js::OpCodeAsmJs::Simd128_LdC, dst.location, cnst.v128[0], cnst.v128[1], cnst.v128[2], cnst.v128[3]);
@@ -1007,7 +1007,7 @@ void WasmBytecodeGenerator::EmitLoadConst(EmitInfo dst, WasmConstLitNode cnst)
     }
 #endif
     default:
-        WasmTypes::CompileAssertCasesNoFailFast<WasmTypes::I32, WasmTypes::I64, WasmTypes::F32, WasmTypes::F64, WASM_M128_CHECK_TYPE>();
+        WasmTypes::CompileAssertCasesNoFailFast<WasmTypes::I32, WasmTypes::I64, WasmTypes::F32, WasmTypes::F64, WASM_V128_CHECK_TYPE>();
         throw WasmCompilationException(_u("Unknown type %u"), dst.type);
     }
 }
@@ -1216,7 +1216,7 @@ PolymorphicEmitInfo WasmBytecodeGenerator::EmitCall()
             argOp = isImportCall ? Js::OpCodeAsmJs::ArgOut_Long : Js::OpCodeAsmJs::I_ArgOut_Long;
             break;
 #ifdef ENABLE_WASM_SIMD
-        case WasmTypes::M128:
+        case WasmTypes::V128:
             Simd::EnsureSimdIsEnabled();
             argOp = isImportCall ? Js::OpCodeAsmJs::Simd128_ArgOut_F4 : Js::OpCodeAsmJs::Simd128_I_ArgOut_F4;
             break;
@@ -1231,7 +1231,7 @@ PolymorphicEmitInfo WasmBytecodeGenerator::EmitCall()
             }
             // Fall through
         default:
-            WasmTypes::CompileAssertCasesNoFailFast<WasmTypes::I32, WasmTypes::I64, WasmTypes::F32, WasmTypes::F64, WASM_M128_CHECK_TYPE>();
+            WasmTypes::CompileAssertCasesNoFailFast<WasmTypes::I32, WasmTypes::I64, WasmTypes::F32, WasmTypes::F64, WASM_V128_CHECK_TYPE>();
             throw WasmCompilationException(_u("Unknown argument type %u"), info.type);
         }
 
@@ -1322,11 +1322,11 @@ PolymorphicEmitInfo WasmBytecodeGenerator::EmitCall()
                 convertOp = Js::OpCodeAsmJs::Conv_VTL;
                 break;
 #ifdef ENABLE_WASM_SIMD
-            case WasmTypes::M128:
-                throw WasmCompilationException(_u("Return type: m128 not supported in import calls"));
+            case WasmTypes::V128:
+                throw WasmCompilationException(_u("Return type: v128 not supported in import calls"));
 #endif
             default:
-                WasmTypes::CompileAssertCasesNoFailFast<WasmTypes::I32, WasmTypes::I64, WasmTypes::F32, WasmTypes::F64, WASM_M128_CHECK_TYPE>();
+                WasmTypes::CompileAssertCasesNoFailFast<WasmTypes::I32, WasmTypes::I64, WasmTypes::F32, WasmTypes::F64, WASM_V128_CHECK_TYPE>();
                 throw WasmCompilationException(_u("Unknown call return type %u"), singleResType);
             }
             Js::RegSlot location = GetRegisterSpace(singleResType)->AcquireTmpRegister();
@@ -1562,8 +1562,8 @@ EmitInfo WasmBytecodeGenerator::EmitReplaceLaneExpr(Js::OpCodeAsmJs op, const Wa
     const WasmTypes::WasmType valueType = signature[1];
     EmitInfo valueArg = PopEvalStack(valueType, _u("lane argument type mismatch"));
 
-    EmitInfo simdArg = PopEvalStack(WasmTypes::M128, _u("simd argument type mismatch"));
-    Assert(resultType == WasmTypes::M128);
+    EmitInfo simdArg = PopEvalStack(WasmTypes::V128, _u("simd argument type mismatch"));
+    Assert(resultType == WasmTypes::V128);
 
     EmitInfo indexInfo = EmitLaneIndex(op);
     Js::RegSlot resultReg = GetRegisterSpace(resultType)->AcquireTmpRegister();
@@ -1575,31 +1575,31 @@ EmitInfo WasmBytecodeGenerator::EmitReplaceLaneExpr(Js::OpCodeAsmJs op, const Wa
     return result;
 }
 
-EmitInfo WasmBytecodeGenerator::EmitM128BitSelect()
+EmitInfo WasmBytecodeGenerator::EmitV128BitSelect()
 {
-    EmitInfo mask = PopEvalStack(WasmTypes::M128);
-    EmitInfo arg2Info = PopEvalStack(WasmTypes::M128);
-    EmitInfo arg1Info = PopEvalStack(WasmTypes::M128);
+    EmitInfo mask = PopEvalStack(WasmTypes::V128);
+    EmitInfo arg2Info = PopEvalStack(WasmTypes::V128);
+    EmitInfo arg1Info = PopEvalStack(WasmTypes::V128);
 
     ReleaseLocation(&mask);
     ReleaseLocation(&arg2Info);
     ReleaseLocation(&arg1Info);
 
-    Js::RegSlot resultReg = GetRegisterSpace(WasmTypes::M128)->AcquireTmpRegister();
-    EmitInfo resultInfo(resultReg, WasmTypes::M128);
+    Js::RegSlot resultReg = GetRegisterSpace(WasmTypes::V128)->AcquireTmpRegister();
+    EmitInfo resultInfo(resultReg, WasmTypes::V128);
     m_writer->AsmReg4(Js::OpCodeAsmJs::Simd128_BitSelect_I4, resultReg, arg1Info.location, arg2Info.location, mask.location);
     return resultInfo;
 }
 
 EmitInfo WasmBytecodeGenerator::EmitV8X16Shuffle()
 {
-    EmitInfo arg2Info = PopEvalStack(WasmTypes::M128);
-    EmitInfo arg1Info = PopEvalStack(WasmTypes::M128);
+    EmitInfo arg2Info = PopEvalStack(WasmTypes::V128);
+    EmitInfo arg1Info = PopEvalStack(WasmTypes::V128);
 
     // FIXME Release arg2Info and arg1Info
 
-    Js::RegSlot resultReg = GetRegisterSpace(WasmTypes::M128)->AcquireTmpRegister();
-    EmitInfo resultInfo(resultReg, WasmTypes::M128);
+    Js::RegSlot resultReg = GetRegisterSpace(WasmTypes::V128)->AcquireTmpRegister();
+    EmitInfo resultInfo(resultReg, WasmTypes::V128);
 
     uint8* indices = GetReader()->m_currentNode.shuffle.indices;
     for (uint i = 0; i < Simd::MAX_LANES; i++)
@@ -1619,8 +1619,7 @@ EmitInfo WasmBytecodeGenerator::EmitExtractLaneExpr(Js::OpCodeAsmJs op, const Wa
     WasmTypes::WasmType resultType = signature[0];
     WasmTypes::WasmType simdArgType = signature[1];
 
-    EmitInfo simdArgInfo = PopEvalStack(simdArgType, _u("Argument should be of type M128"));
-    ReleaseLocation(&simdArgInfo);
+    EmitInfo simdArgInfo = PopEvalStack(simdArgType, _u("Argument should be of type V128"));
 
     Js::RegSlot resultReg = GetRegisterSpace(resultType)->AcquireTmpRegister();
     EmitInfo resultInfo(resultReg, resultType);
@@ -1836,7 +1835,7 @@ Js::OpCodeAsmJs WasmBytecodeGenerator::GetLoadOp(WasmTypes::WasmType wasmType)
     case WasmTypes::I64:
         return Js::OpCodeAsmJs::Ld_Long;
 #ifdef ENABLE_WASM_SIMD
-    case WasmTypes::M128:
+    case WasmTypes::V128:
         Simd::EnsureSimdIsEnabled();
         return Js::OpCodeAsmJs::Simd128_Ld_F4;
 #endif
@@ -1848,7 +1847,7 @@ Js::OpCodeAsmJs WasmBytecodeGenerator::GetLoadOp(WasmTypes::WasmType wasmType)
             return Js::OpCodeAsmJs::Ld_Int;
         }
     default:
-        WasmTypes::CompileAssertCasesNoFailFast<WasmTypes::I32, WasmTypes::I64, WasmTypes::F32, WasmTypes::F64, WASM_M128_CHECK_TYPE>();
+        WasmTypes::CompileAssertCasesNoFailFast<WasmTypes::I32, WasmTypes::I64, WasmTypes::F32, WasmTypes::F64, WASM_V128_CHECK_TYPE>();
         throw WasmCompilationException(_u("Unknown load operator %u"), wasmType);
     }
 }
@@ -1871,7 +1870,7 @@ Js::OpCodeAsmJs WasmBytecodeGenerator::GetReturnOp(WasmTypes::WasmType type)
         retOp = Js::OpCodeAsmJs::Return_Long;
         break;
 #ifdef ENABLE_WASM_SIMD
-    case WasmTypes::M128:
+    case WasmTypes::V128:
         Simd::EnsureSimdIsEnabled();
         retOp = Js::OpCodeAsmJs::Simd128_Return_F4;
         break;
@@ -1884,7 +1883,7 @@ Js::OpCodeAsmJs WasmBytecodeGenerator::GetReturnOp(WasmTypes::WasmType type)
             return Js::OpCodeAsmJs::Return_Int;
         }
     default:
-        WasmTypes::CompileAssertCasesNoFailFast<WasmTypes::I32, WasmTypes::I64, WasmTypes::F32, WasmTypes::F64, WASM_M128_CHECK_TYPE>();
+        WasmTypes::CompileAssertCasesNoFailFast<WasmTypes::I32, WasmTypes::I64, WasmTypes::F32, WasmTypes::F64, WASM_V128_CHECK_TYPE>();
         throw WasmCompilationException(_u("Unknown return type %u"), type);
     }
     return retOp;
@@ -2065,12 +2064,12 @@ WasmRegisterSpace* WasmBytecodeGenerator::GetRegisterSpace(WasmTypes::WasmType t
     case WasmTypes::F32:    return mTypedRegisterAllocator.GetRegisterSpace(WAsmJs::FLOAT32);
     case WasmTypes::F64:    return mTypedRegisterAllocator.GetRegisterSpace(WAsmJs::FLOAT64);
 #ifdef ENABLE_WASM_SIMD
-    case WasmTypes::M128:
+    case WasmTypes::V128:
         Simd::EnsureSimdIsEnabled();
         return mTypedRegisterAllocator.GetRegisterSpace(WAsmJs::SIMD);
 #endif
     default:
-        WasmTypes::CompileAssertCasesNoFailFast<WasmTypes::I32, WasmTypes::I64, WasmTypes::F32, WasmTypes::F64, WASM_M128_CHECK_TYPE>();
+        WasmTypes::CompileAssertCasesNoFailFast<WasmTypes::I32, WasmTypes::I64, WasmTypes::F32, WasmTypes::F64, WASM_V128_CHECK_TYPE>();
         throw WasmCompilationException(_u("Unknown type %u"), type);
     }
 }

+ 1 - 1
lib/WasmReader/WasmByteCodeGenerator.h

@@ -242,7 +242,7 @@ namespace Wasm
         EmitInfo EmitSimdMemAccess(Js::OpCodeAsmJs op, const WasmTypes::WasmType* signature, Js::ArrayBufferView::ViewType viewType, uint8 dataWidth, bool isStore);
         EmitInfo EmitBinExpr(Js::OpCodeAsmJs op, const WasmTypes::WasmType* signature);
         EmitInfo EmitUnaryExpr(Js::OpCodeAsmJs op, const WasmTypes::WasmType* signature);
-        EmitInfo EmitM128BitSelect();
+        EmitInfo EmitV128BitSelect();
         EmitInfo EmitV8X16Shuffle();
         EmitInfo EmitExtractLaneExpr(Js::OpCodeAsmJs op, const WasmTypes::WasmType* signature);
         EmitInfo EmitReplaceLaneExpr(Js::OpCodeAsmJs op, const WasmTypes::WasmType* signature);

+ 5 - 5
lib/WasmReader/WasmParseTree.cpp

@@ -81,7 +81,7 @@ bool IsLocalType(WasmTypes::WasmType type)
 {
     // Check if type in range ]Void,Limit[
 #ifdef ENABLE_WASM_SIMD
-    if (type == WasmTypes::M128 && !Simd::IsEnabled())
+    if (type == WasmTypes::V128 && !Simd::IsEnabled())
     {
         return false;
     }
@@ -99,7 +99,7 @@ uint32 GetTypeByteSize(WasmType type)
     case F32: return sizeof(float);
     case F64: return sizeof(double);
 #ifdef ENABLE_WASM_SIMD
-    case M128:
+    case V128:
         Simd::EnsureSimdIsEnabled();
         CompileAssert(sizeof(Simd::simdvec) == 16);
         return sizeof(Simd::simdvec);
@@ -119,7 +119,7 @@ const char16 * GetTypeName(WasmType type)
     case WasmTypes::WasmType::F32: return _u("f32");
     case WasmTypes::WasmType::F64: return _u("f64");
 #ifdef ENABLE_WASM_SIMD
-    case WasmTypes::WasmType::M128: 
+    case WasmTypes::WasmType::V128: 
         Simd::EnsureSimdIsEnabled();
         return _u("m128");
 #endif
@@ -140,9 +140,9 @@ WasmTypes::WasmType LanguageTypes::ToWasmType(int8 binType)
     case LanguageTypes::f32: return WasmTypes::F32;
     case LanguageTypes::f64: return WasmTypes::F64;
 #ifdef ENABLE_WASM_SIMD
-    case LanguageTypes::m128:
+    case LanguageTypes::v128:
         Simd::EnsureSimdIsEnabled();
-        return WasmTypes::M128;
+        return WasmTypes::V128;
 #endif
     default:
         throw WasmCompilationException(_u("Invalid binary type %d"), binType);

+ 4 - 4
lib/WasmReader/WasmParseTree.h

@@ -42,7 +42,7 @@ namespace Wasm
             F32 = 3,
             F64 = 4,
 #ifdef ENABLE_WASM_SIMD
-            M128 = 5,
+            V128 = 5,
 #endif
             Limit,
             Ptr,
@@ -55,7 +55,7 @@ namespace Wasm
                 | 1 << F32
                 | 1 << F64
 #ifdef ENABLE_WASM_SIMD
-                | 1 << M128
+                | 1 << V128
 #endif
         };
 
@@ -84,9 +84,9 @@ namespace Wasm
         }
 
 #ifdef ENABLE_WASM_SIMD
-#define WASM_M128_CHECK_TYPE Wasm::WasmTypes::M128
+#define WASM_V128_CHECK_TYPE Wasm::WasmTypes::V128
 #else
-#define WASM_M128_CHECK_TYPE Wasm::WasmTypes::Limit
+#define WASM_V128_CHECK_TYPE Wasm::WasmTypes::Limit
 #endif
 
         template<WasmType... T>

+ 2 - 2
lib/WasmReader/WasmSignature.cpp

@@ -148,14 +148,14 @@ Js::ArgSlot WasmSignature::GetParamSize(Js::ArgSlot index) const
         return sizeof(int64);
         break;
 #ifdef ENABLE_WASM_SIMD
-    case WasmTypes::M128:
+    case WasmTypes::V128:
         Wasm::Simd::EnsureSimdIsEnabled();
         CompileAssert(sizeof(Simd::simdvec) == 16);
         return sizeof(Simd::simdvec);
         break;
 #endif
     default:
-        WasmTypes::CompileAssertCasesNoFailFast<WasmTypes::I32, WasmTypes::I64, WasmTypes::F32, WasmTypes::F64, WASM_M128_CHECK_TYPE>();
+        WasmTypes::CompileAssertCasesNoFailFast<WasmTypes::I32, WasmTypes::I64, WasmTypes::F32, WasmTypes::F64, WASM_V128_CHECK_TYPE>();
         throw WasmCompilationException(_u("Invalid param type"));
     }
 }