summaryrefslogtreecommitdiff
path: root/test/binaryen.js/simd.js
blob: 68785f9d73f46eedd58d2aada2d19eb092ed8db4 (plain)
1
2
3
4
5
6
7
8
9
function test() {
  var module = new Binaryen.Module();

  var expr = module.v128.const([1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 4, 0, 0, 0]);
  var info = Binaryen.getExpressionInfo(expr);
  console.log("v128.const i8x16 0x" + info.value.map(b => b.toString(16)).join(" 0x"));
}

Binaryen.ready.then(test);