Parcourir la source

Remove reference to `build` instruction

Remove WASM_SIMD_BUILD_OPCODE macro and the EmitSimdBuildExpr that used
to generate code for build instruction.
Petr Penzin il y a 7 ans
Parent
commit
39425ccb6c

+ 0 - 4
lib/WasmReader/WasmBinaryOpcodesSimd.h

@@ -15,10 +15,6 @@
 #define WASM_REPLACELANE_OPCODE(opname, opcode, sig, asmjsop, imp, wat) WASM_LANE_OPCODE(opname, opcode, sig, imp, wat)
 #endif
 
-#ifndef WASM_SIMD_BUILD_OPCODE
-#define WASM_SIMD_BUILD_OPCODE(opname, opcode, sig, asmjop, lanes, imp, wat) WASM_OPCODE(opname, opcode, sig, imp, wat)
-#endif
-
 #ifndef WASM_SIMD_MEMREAD_OPCODE
 #define WASM_SIMD_MEMREAD_OPCODE(opname, opcode, sig, asmjsop, viewtype, dataWidth, imp, wat) WASM_MEM_OPCODE(opname, opcode, sig, imp, wat)
 #endif

+ 0 - 42
lib/WasmReader/WasmByteCodeGenerator.cpp

@@ -645,43 +645,6 @@ void WasmBytecodeGenerator::EnregisterLocals()
     }
 }
 
-template <size_t lanes>
-EmitInfo WasmBytecodeGenerator::EmitSimdBuildExpr(Js::OpCodeAsmJs op, const WasmTypes::WasmType* signature)
-{
-    const WasmTypes::WasmType resultType = signature[0];
-    const WasmTypes::WasmType type = signature[1];
-
-    Js::RegSlot resultReg = GetRegisterSpace(resultType)->AcquireTmpRegister();
-
-    EmitInfo args[lanes];
-    for (uint i = 0; i < lanes; i++)
-    {
-        args[i] = PopEvalStack(type);
-    }
-
-    switch (lanes)
-    {
-        case 4:
-            m_writer->AsmReg5(op, resultReg, args[3].location, args[2].location, args[1].location, args[0].location);
-            break;
-        case 8:
-            m_writer->AsmReg9(op, resultReg, args[7].location, args[6].location, args[5].location, args[4].location, args[3].location, args[2].location, args[1].location, args[0].location);
-            break;
-        case 16:
-            m_writer->AsmReg17(op, resultReg, args[15].location, args[14].location, args[13].location, args[12].location, args[11].location, args[10].location, args[9].location, args[8].location, args[7].location, args[6].location, args[5].location, args[4].location, args[3].location, args[2].location, args[1].location, args[0].location);
-            break;
-        default:
-            Assert(UNREACHED);
-    }
-
-    for (uint i = 0; i < lanes; i++)
-    {
-        ReleaseLocation(&args[i]);
-    }
-
-    return EmitInfo(resultReg, resultType);
-}
-
 void WasmBytecodeGenerator::EmitExpr(WasmOp op)
 {
     DebugPrintOp(op);
@@ -851,11 +814,6 @@ void WasmBytecodeGenerator::EmitExpr(WasmOp op)
         Assert(WasmOpCodeSignatures::n##sig == 2);\
         info = EmitUnaryExpr(Js::OpCodeAsmJs::##asmjsop, WasmOpCodeSignatures::sig); \
         break;
-#define WASM_SIMD_BUILD_OPCODE(opname, opcode, sig, asmjop, lanes, ...) \
-    case wb##opname: \
-        Assert(WasmOpCodeSignatures::n##sig == 2);\
-        info = EmitSimdBuildExpr<lanes>(Js::OpCodeAsmJs::##asmjop, WasmOpCodeSignatures::sig); \
-        break;
 #define WASM_EMPTY__OPCODE(opname, opcode, asmjsop, imp, wat) \
     case wb##opname: \
         m_writer->EmptyAsm(Js::OpCodeAsmJs::##asmjsop);\

+ 0 - 2
lib/WasmReader/WasmByteCodeGenerator.h

@@ -205,8 +205,6 @@ namespace Wasm
     private:
         void GenerateFunction();
 
-        template <size_t lanes> 
-        EmitInfo EmitSimdBuildExpr(Js::OpCodeAsmJs op, const WasmTypes::WasmType* signature);
         void EmitExpr(WasmOp op);
         PolymorphicEmitInfo EmitBlock();
         void EmitBlockCommon(BlockInfo* blockInfo, bool* endOnElse = nullptr);