interpreter: fixes i32x4/i16x8 bit mask (#704)

Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
This commit is contained in:
Takeshi Yoneda
2022-07-15 16:07:49 +09:00
committed by GitHub
parent a536716495
commit ff4a7ff4f9
4 changed files with 39 additions and 4 deletions

View File

@@ -21,6 +21,8 @@ var (
case699 []byte
//go:embed testdata/701.wasm
case701 []byte
//go:embed testdata/704.wasm
case704 []byte
)
func newRuntimeCompiler() wazero.Runtime {
@@ -142,3 +144,24 @@ func Test701(t *testing.T) {
})
}
}
func Test704(t *testing.T) {
if !platform.CompilerSupported() {
return
}
for _, tc := range []struct {
name string
r wazero.Runtime
}{
{name: "compiler", r: newRuntimeCompiler()},
{name: "interpreter", r: newRuntimeInterpreter()},
} {
tc := tc
t.Run(tc.name, func(t *testing.T) {
defer tc.r.Close(ctx)
_, err := tc.r.InstantiateModuleFromBinary(ctx, case704)
require.NoError(t, err)
})
}
}