Skip to content

Commit 39425cc

Browse files
committed
Remove reference to build instruction
Remove WASM_SIMD_BUILD_OPCODE macro and the EmitSimdBuildExpr that used to generate code for build instruction.
1 parent d13dbc3 commit 39425cc

File tree

3 files changed

+0
-48
lines changed

3 files changed

+0
-48
lines changed

lib/WasmReader/WasmBinaryOpcodesSimd.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
#define WASM_REPLACELANE_OPCODE(opname, opcode, sig, asmjsop, imp, wat) WASM_LANE_OPCODE(opname, opcode, sig, imp, wat)
1616
#endif
1717

18-
#ifndef WASM_SIMD_BUILD_OPCODE
19-
#define WASM_SIMD_BUILD_OPCODE(opname, opcode, sig, asmjop, lanes, imp, wat) WASM_OPCODE(opname, opcode, sig, imp, wat)
20-
#endif
21-
2218
#ifndef WASM_SIMD_MEMREAD_OPCODE
2319
#define WASM_SIMD_MEMREAD_OPCODE(opname, opcode, sig, asmjsop, viewtype, dataWidth, imp, wat) WASM_MEM_OPCODE(opname, opcode, sig, imp, wat)
2420
#endif

lib/WasmReader/WasmByteCodeGenerator.cpp

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -645,43 +645,6 @@ void WasmBytecodeGenerator::EnregisterLocals()
645645
}
646646
}
647647

648-
template <size_t lanes>
649-
EmitInfo WasmBytecodeGenerator::EmitSimdBuildExpr(Js::OpCodeAsmJs op, const WasmTypes::WasmType* signature)
650-
{
651-
const WasmTypes::WasmType resultType = signature[0];
652-
const WasmTypes::WasmType type = signature[1];
653-
654-
Js::RegSlot resultReg = GetRegisterSpace(resultType)->AcquireTmpRegister();
655-
656-
EmitInfo args[lanes];
657-
for (uint i = 0; i < lanes; i++)
658-
{
659-
args[i] = PopEvalStack(type);
660-
}
661-
662-
switch (lanes)
663-
{
664-
case 4:
665-
m_writer->AsmReg5(op, resultReg, args[3].location, args[2].location, args[1].location, args[0].location);
666-
break;
667-
case 8:
668-
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);
669-
break;
670-
case 16:
671-
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);
672-
break;
673-
default:
674-
Assert(UNREACHED);
675-
}
676-
677-
for (uint i = 0; i < lanes; i++)
678-
{
679-
ReleaseLocation(&args[i]);
680-
}
681-
682-
return EmitInfo(resultReg, resultType);
683-
}
684-
685648
void WasmBytecodeGenerator::EmitExpr(WasmOp op)
686649
{
687650
DebugPrintOp(op);
@@ -851,11 +814,6 @@ void WasmBytecodeGenerator::EmitExpr(WasmOp op)
851814
Assert(WasmOpCodeSignatures::n##sig == 2);\
852815
info = EmitUnaryExpr(Js::OpCodeAsmJs::##asmjsop, WasmOpCodeSignatures::sig); \
853816
break;
854-
#define WASM_SIMD_BUILD_OPCODE(opname, opcode, sig, asmjop, lanes, ...) \
855-
case wb##opname: \
856-
Assert(WasmOpCodeSignatures::n##sig == 2);\
857-
info = EmitSimdBuildExpr<lanes>(Js::OpCodeAsmJs::##asmjop, WasmOpCodeSignatures::sig); \
858-
break;
859817
#define WASM_EMPTY__OPCODE(opname, opcode, asmjsop, imp, wat) \
860818
case wb##opname: \
861819
m_writer->EmptyAsm(Js::OpCodeAsmJs::##asmjsop);\

lib/WasmReader/WasmByteCodeGenerator.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,6 @@ namespace Wasm
205205
private:
206206
void GenerateFunction();
207207

208-
template <size_t lanes>
209-
EmitInfo EmitSimdBuildExpr(Js::OpCodeAsmJs op, const WasmTypes::WasmType* signature);
210208
void EmitExpr(WasmOp op);
211209
PolymorphicEmitInfo EmitBlock();
212210
void EmitBlockCommon(BlockInfo* blockInfo, bool* endOnElse = nullptr);

0 commit comments

Comments
 (0)