Skip to content

Commit 98f2986

Browse files
authored
Add new min/max/dot SIMD instructions (#952)
1 parent 3c0be28 commit 98f2986

File tree

9 files changed

+613
-313
lines changed

9 files changed

+613
-313
lines changed

Diff for: package-lock.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"url": "https://github.com/AssemblyScript/assemblyscript/issues"
2222
},
2323
"dependencies": {
24-
"binaryen": "89.0.0-nightly.20191012",
24+
"binaryen": "89.0.0-nightly.20191113",
2525
"long": "^4.0.0",
2626
"source-map-support": "^0.5.16",
2727
"ts-node": "^6.2.0",

Diff for: src/builtins.ts

+78
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ export namespace BuiltinSymbols {
323323
export const v128_all_true = "~lib/builtins/v128.all_true";
324324
export const v128_min = "~lib/builtins/v128.min";
325325
export const v128_max = "~lib/builtins/v128.max";
326+
export const v128_dot = "~lib/builtins/v128.dot";
326327
export const v128_abs = "~lib/builtins/v128.abs";
327328
export const v128_sqrt = "~lib/builtins/v128.sqrt";
328329
export const v128_eq = "~lib/builtins/v128.eq";
@@ -353,6 +354,10 @@ export namespace BuiltinSymbols {
353354
export const i8x16_add = "~lib/builtins/i8x16.add";
354355
export const i8x16_sub = "~lib/builtins/i8x16.sub";
355356
export const i8x16_mul = "~lib/builtins/i8x16.mul";
357+
export const i8x16_min_s = "~lib/builtins/i8x16.min_s";
358+
export const i8x16_min_u = "~lib/builtins/i8x16.min_u";
359+
export const i8x16_max_s = "~lib/builtins/i8x16.max_s";
360+
export const i8x16_max_u = "~lib/builtins/i8x16.max_u";
356361
export const i8x16_neg = "~lib/builtins/i8x16.neg";
357362
export const i8x16_add_saturate_s = "~lib/builtins/i8x16.add_saturate_s";
358363
export const i8x16_add_saturate_u = "~lib/builtins/i8x16.add_saturate_u";
@@ -383,6 +388,10 @@ export namespace BuiltinSymbols {
383388
export const i16x8_add = "~lib/builtins/i16x8.add";
384389
export const i16x8_sub = "~lib/builtins/i16x8.sub";
385390
export const i16x8_mul = "~lib/builtins/i16x8.mul";
391+
export const i16x8_min_s = "~lib/builtins/i16x8.min_s";
392+
export const i16x8_min_u = "~lib/builtins/i16x8.min_u";
393+
export const i16x8_max_s = "~lib/builtins/i16x8.max_s";
394+
export const i16x8_max_u = "~lib/builtins/i16x8.max_u";
386395
export const i16x8_neg = "~lib/builtins/i16x8.neg";
387396
export const i16x8_add_saturate_s = "~lib/builtins/i16x8.add_saturate_s";
388397
export const i16x8_add_saturate_u = "~lib/builtins/i16x8.add_saturate_u";
@@ -418,6 +427,11 @@ export namespace BuiltinSymbols {
418427
export const i32x4_add = "~lib/builtins/i32x4.add";
419428
export const i32x4_sub = "~lib/builtins/i32x4.sub";
420429
export const i32x4_mul = "~lib/builtins/i32x4.mul";
430+
export const i32x4_min_s = "~lib/builtins/i32x4.min_s";
431+
export const i32x4_min_u = "~lib/builtins/i32x4.min_u";
432+
export const i32x4_max_s = "~lib/builtins/i32x4.max_s";
433+
export const i32x4_max_u = "~lib/builtins/i32x4.max_u";
434+
export const i32x4_dot_i16x8_s = "~lib/builtins/i32x4.dot_i16x8_s";
421435
export const i32x4_neg = "~lib/builtins/i32x4.neg";
422436
export const i32x4_shl = "~lib/builtins/i32x4.shl";
423437
export const i32x4_shr_s = "~lib/builtins/i32x4.shr_s";
@@ -3332,6 +3346,20 @@ export function compileCall(
33323346
let arg1 = compiler.compileExpression(operands[1], Type.v128, Constraints.CONV_IMPLICIT);
33333347
if (!type.is(TypeFlags.REFERENCE)) {
33343348
switch (type.kind) {
3349+
case TypeKind.I8: return module.binary(BinaryOp.MinI8x16, arg0, arg1);
3350+
case TypeKind.U8: return module.binary(BinaryOp.MinU8x16, arg0, arg1);
3351+
case TypeKind.I16: return module.binary(BinaryOp.MinI16x8, arg0, arg1);
3352+
case TypeKind.U16: return module.binary(BinaryOp.MinU16x8, arg0, arg1);
3353+
case TypeKind.ISIZE: {
3354+
if (compiler.options.isWasm64) break;
3355+
// fall-through
3356+
}
3357+
case TypeKind.I32: return module.binary(BinaryOp.MinI32x4, arg0, arg1);
3358+
case TypeKind.USIZE: {
3359+
if (compiler.options.isWasm64) break;
3360+
// fall-through
3361+
}
3362+
case TypeKind.U32: return module.binary(BinaryOp.MinU32x4, arg0, arg1);
33353363
case TypeKind.F32: return module.binary(BinaryOp.MinF32x4, arg0, arg1);
33363364
case TypeKind.F64: return module.binary(BinaryOp.MinF64x2, arg0, arg1);
33373365
}
@@ -3356,6 +3384,20 @@ export function compileCall(
33563384
let arg1 = compiler.compileExpression(operands[1], Type.v128, Constraints.CONV_IMPLICIT);
33573385
if (!type.is(TypeFlags.REFERENCE)) {
33583386
switch (type.kind) {
3387+
case TypeKind.I8: return module.binary(BinaryOp.MaxI8x16, arg0, arg1);
3388+
case TypeKind.U8: return module.binary(BinaryOp.MaxU8x16, arg0, arg1);
3389+
case TypeKind.I16: return module.binary(BinaryOp.MaxI16x8, arg0, arg1);
3390+
case TypeKind.U16: return module.binary(BinaryOp.MaxU16x8, arg0, arg1);
3391+
case TypeKind.ISIZE: {
3392+
if (compiler.options.isWasm64) break;
3393+
// fall-through
3394+
}
3395+
case TypeKind.I32: return module.binary(BinaryOp.MaxI32x4, arg0, arg1);
3396+
case TypeKind.USIZE: {
3397+
if (compiler.options.isWasm64) break;
3398+
// fall-through
3399+
}
3400+
case TypeKind.U32: return module.binary(BinaryOp.MaxU32x4, arg0, arg1);
33593401
case TypeKind.F32: return module.binary(BinaryOp.MaxF32x4, arg0, arg1);
33603402
case TypeKind.F64: return module.binary(BinaryOp.MaxF64x2, arg0, arg1);
33613403
}
@@ -3366,6 +3408,29 @@ export function compileCall(
33663408
);
33673409
return module.unreachable();
33683410
}
3411+
case BuiltinSymbols.v128_dot: { // dot<T!>(a: v128, b: v128) -> v128
3412+
if (
3413+
checkFeatureEnabled(Feature.SIMD, reportNode, compiler) |
3414+
checkTypeRequired(typeArguments, reportNode, compiler) |
3415+
checkArgsRequired(operands, 2, reportNode, compiler)
3416+
) {
3417+
compiler.currentType = Type.v128;
3418+
return module.unreachable();
3419+
}
3420+
let type = typeArguments![0];
3421+
let arg0 = compiler.compileExpression(operands[0], Type.v128, Constraints.CONV_IMPLICIT);
3422+
let arg1 = compiler.compileExpression(operands[1], Type.v128, Constraints.CONV_IMPLICIT);
3423+
if (!type.is(TypeFlags.REFERENCE)) {
3424+
switch (type.kind) {
3425+
case TypeKind.I16: return module.binary(BinaryOp.DotI16x8, arg0, arg1);
3426+
}
3427+
}
3428+
compiler.error(
3429+
DiagnosticCode.Operation_0_cannot_be_applied_to_type_1,
3430+
reportNode.typeArgumentsRange, "v128.dot", type.toString()
3431+
);
3432+
return module.unreachable();
3433+
}
33693434
case BuiltinSymbols.v128_eq: { // eq<T!>(a: v128, b: v128) -> v128
33703435
if (
33713436
checkFeatureEnabled(Feature.SIMD, reportNode, compiler) |
@@ -4501,6 +4566,10 @@ function tryDeferASM(
45014566
case BuiltinSymbols.i8x16_add: return deferASM(BuiltinSymbols.v128_add, compiler, Type.i8, operands, Type.v128, reportNode);
45024567
case BuiltinSymbols.i8x16_sub: return deferASM(BuiltinSymbols.v128_sub, compiler, Type.i8, operands, Type.v128, reportNode);
45034568
case BuiltinSymbols.i8x16_mul: return deferASM(BuiltinSymbols.v128_mul, compiler, Type.i8, operands, Type.v128, reportNode);
4569+
case BuiltinSymbols.i8x16_min_s: return deferASM(BuiltinSymbols.v128_min, compiler, Type.i8, operands, Type.v128, reportNode);
4570+
case BuiltinSymbols.i8x16_min_u: return deferASM(BuiltinSymbols.v128_min, compiler, Type.u8, operands, Type.v128, reportNode);
4571+
case BuiltinSymbols.i8x16_max_s: return deferASM(BuiltinSymbols.v128_max, compiler, Type.i8, operands, Type.v128, reportNode);
4572+
case BuiltinSymbols.i8x16_max_u: return deferASM(BuiltinSymbols.v128_max, compiler, Type.u8, operands, Type.v128, reportNode);
45044573
case BuiltinSymbols.i8x16_neg: return deferASM(BuiltinSymbols.v128_neg, compiler, Type.i8, operands, Type.v128, reportNode);
45054574
case BuiltinSymbols.i8x16_add_saturate_s: return deferASM(BuiltinSymbols.v128_add_saturate, compiler, Type.i8, operands, Type.v128, reportNode);
45064575
case BuiltinSymbols.i8x16_add_saturate_u: return deferASM(BuiltinSymbols.v128_add_saturate, compiler, Type.u8, operands, Type.v128, reportNode);
@@ -4531,6 +4600,10 @@ function tryDeferASM(
45314600
case BuiltinSymbols.i16x8_add: return deferASM(BuiltinSymbols.v128_add, compiler, Type.i16, operands, Type.v128, reportNode);
45324601
case BuiltinSymbols.i16x8_sub: return deferASM(BuiltinSymbols.v128_sub, compiler, Type.i16, operands, Type.v128, reportNode);
45334602
case BuiltinSymbols.i16x8_mul: return deferASM(BuiltinSymbols.v128_mul, compiler, Type.i16, operands, Type.v128, reportNode);
4603+
case BuiltinSymbols.i16x8_min_s: return deferASM(BuiltinSymbols.v128_min, compiler, Type.i16, operands, Type.v128, reportNode);
4604+
case BuiltinSymbols.i16x8_min_u: return deferASM(BuiltinSymbols.v128_min, compiler, Type.u16, operands, Type.v128, reportNode);
4605+
case BuiltinSymbols.i16x8_max_s: return deferASM(BuiltinSymbols.v128_max, compiler, Type.i16, operands, Type.v128, reportNode);
4606+
case BuiltinSymbols.i16x8_max_u: return deferASM(BuiltinSymbols.v128_max, compiler, Type.u16, operands, Type.v128, reportNode);
45344607
case BuiltinSymbols.i16x8_neg: return deferASM(BuiltinSymbols.v128_neg, compiler, Type.i16, operands, Type.v128, reportNode);
45354608
case BuiltinSymbols.i16x8_add_saturate_s: return deferASM(BuiltinSymbols.v128_add_saturate, compiler, Type.i16, operands, Type.v128, reportNode);
45364609
case BuiltinSymbols.i16x8_add_saturate_u: return deferASM(BuiltinSymbols.v128_add_saturate, compiler, Type.u16, operands, Type.v128, reportNode);
@@ -4566,6 +4639,11 @@ function tryDeferASM(
45664639
case BuiltinSymbols.i32x4_add: return deferASM(BuiltinSymbols.v128_add, compiler, Type.i32, operands, Type.v128, reportNode);
45674640
case BuiltinSymbols.i32x4_sub: return deferASM(BuiltinSymbols.v128_sub, compiler, Type.i32, operands, Type.v128, reportNode);
45684641
case BuiltinSymbols.i32x4_mul: return deferASM(BuiltinSymbols.v128_mul, compiler, Type.i32, operands, Type.v128, reportNode);
4642+
case BuiltinSymbols.i32x4_min_s: return deferASM(BuiltinSymbols.v128_min, compiler, Type.i32, operands, Type.v128, reportNode);
4643+
case BuiltinSymbols.i32x4_min_u: return deferASM(BuiltinSymbols.v128_min, compiler, Type.u32, operands, Type.v128, reportNode);
4644+
case BuiltinSymbols.i32x4_max_s: return deferASM(BuiltinSymbols.v128_max, compiler, Type.i32, operands, Type.v128, reportNode);
4645+
case BuiltinSymbols.i32x4_max_u: return deferASM(BuiltinSymbols.v128_max, compiler, Type.u32, operands, Type.v128, reportNode);
4646+
case BuiltinSymbols.i32x4_dot_i16x8_s: return deferASM(BuiltinSymbols.v128_dot, compiler, Type.i16, operands, Type.v128, reportNode);
45694647
case BuiltinSymbols.i32x4_neg: return deferASM(BuiltinSymbols.v128_neg, compiler, Type.i32, operands, Type.v128, reportNode);
45704648
case BuiltinSymbols.i32x4_shl: return deferASM(BuiltinSymbols.v128_shl, compiler, Type.i32, operands, Type.v128, reportNode);
45714649
case BuiltinSymbols.i32x4_shr_s: return deferASM(BuiltinSymbols.v128_shr, compiler, Type.i32, operands, Type.v128, reportNode);

Diff for: src/glue/binaryen.d.ts

+21
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,10 @@ declare function _BinaryenSubVecI8x16(): BinaryenOp;
331331
declare function _BinaryenSubSatSVecI8x16(): BinaryenOp;
332332
declare function _BinaryenSubSatUVecI8x16(): BinaryenOp;
333333
declare function _BinaryenMulVecI8x16(): BinaryenOp;
334+
declare function _BinaryenMinSVecI8x16(): BinaryenOp;
335+
declare function _BinaryenMinUVecI8x16(): BinaryenOp;
336+
declare function _BinaryenMaxSVecI8x16(): BinaryenOp;
337+
declare function _BinaryenMaxUVecI8x16(): BinaryenOp;
334338
declare function _BinaryenNegVecI16x8(): BinaryenOp;
335339
declare function _BinaryenAnyTrueVecI16x8(): BinaryenOp;
336340
declare function _BinaryenAllTrueVecI16x8(): BinaryenOp;
@@ -344,6 +348,10 @@ declare function _BinaryenSubVecI16x8(): BinaryenOp;
344348
declare function _BinaryenSubSatSVecI16x8(): BinaryenOp;
345349
declare function _BinaryenSubSatUVecI16x8(): BinaryenOp;
346350
declare function _BinaryenMulVecI16x8(): BinaryenOp;
351+
declare function _BinaryenMinSVecI16x8(): BinaryenOp;
352+
declare function _BinaryenMinUVecI16x8(): BinaryenOp;
353+
declare function _BinaryenMaxSVecI16x8(): BinaryenOp;
354+
declare function _BinaryenMaxUVecI16x8(): BinaryenOp;
347355
declare function _BinaryenNegVecI32x4(): BinaryenOp;
348356
declare function _BinaryenAnyTrueVecI32x4(): BinaryenOp;
349357
declare function _BinaryenAllTrueVecI32x4(): BinaryenOp;
@@ -353,6 +361,11 @@ declare function _BinaryenShrUVecI32x4(): BinaryenOp;
353361
declare function _BinaryenAddVecI32x4(): BinaryenOp;
354362
declare function _BinaryenSubVecI32x4(): BinaryenOp;
355363
declare function _BinaryenMulVecI32x4(): BinaryenOp;
364+
declare function _BinaryenMinSVecI32x4(): BinaryenOp;
365+
declare function _BinaryenMinUVecI32x4(): BinaryenOp;
366+
declare function _BinaryenMaxSVecI32x4(): BinaryenOp;
367+
declare function _BinaryenMaxUVecI32x4(): BinaryenOp;
368+
declare function _BinaryenDotSVecI16x8ToVecI32x4(): BinaryenOp;
356369
declare function _BinaryenNegVecI64x2(): BinaryenOp;
357370
declare function _BinaryenAnyTrueVecI64x2(): BinaryenOp;
358371
declare function _BinaryenAllTrueVecI64x2(): BinaryenOp;
@@ -650,6 +663,8 @@ declare type BinaryenFunctionRef = usize;
650663
declare function _BinaryenAddFunction(module: BinaryenModuleRef, name: usize, type: BinaryenFunctionTypeRef, varTypes: usize, numVarTypes: BinaryenIndex, body: BinaryenExpressionRef): BinaryenFunctionRef;
651664
declare function _BinaryenGetFunction(module: BinaryenModuleRef, name: usize): BinaryenFunctionRef;
652665
declare function _BinaryenRemoveFunction(module: BinaryenModuleRef, name: usize): void;
666+
declare function _BinaryenGetNumFunctions(module: BinaryenModuleRef): BinaryenIndex;
667+
declare function _BinaryenGetFunctionByIndex(module: BinaryenModuleRef, index: BinaryenIndex): BinaryenFunctionRef;
653668

654669
declare function _BinaryenFunctionGetName(func: BinaryenFunctionRef): usize;
655670
declare function _BinaryenFunctionGetType(func: BinaryenFunctionRef): BinaryenFunctionTypeRef;
@@ -679,6 +694,8 @@ declare function _BinaryenAddMemoryExport(module: BinaryenModuleRef, internalNam
679694
declare function _BinaryenAddGlobalExport(module: BinaryenModuleRef, internalName: usize, externalName: usize): BinaryenExportRef;
680695
declare function _BinaryenAddEventExport(module: BinaryenModuleRef, internalName: usize, externalName: usize): BinaryenExportRef;
681696
declare function _BinaryenRemoveExport(module: BinaryenModuleRef, externalName: usize): void;
697+
declare function _BinaryenGetNumExports(module: BinaryenModuleRef): BinaryenIndex;
698+
declare function _BinaryenGetExportByIndex(module: BinaryenModuleRef, index: BinaryenIndex): BinaryenExportRef;
682699

683700
declare type BinaryenGlobalRef = usize;
684701

@@ -700,6 +717,10 @@ declare function _BinaryenEventGetParam(event: BinaryenEventRef, index: Binaryen
700717
declare function _BinaryenSetFunctionTable(module: BinaryenModuleRef, initial: BinaryenIndex, maximum: BinaryenIndex, funcs: usize, numFuncs: BinaryenIndex, offset: BinaryenExpressionRef): void;
701718

702719
declare function _BinaryenSetMemory(module: BinaryenModuleRef, initial: BinaryenIndex, maximum: BinaryenIndex, exportName: usize, segments: usize, segmentPassive: usize, segmentOffsets: usize, segmentSizes: usize, numSegments: BinaryenIndex, shared: bool): void;
720+
declare function _BinaryenGetNumMemorySegments(module: BinaryenModuleRef): BinaryenIndex;
721+
declare function _BinaryenGetMemorySegmentByteOffset(module: BinaryenModuleRef, index: BinaryenIndex): u32;
722+
declare function _BinaryenGetMemorySegmentByteLength(module: BinaryenModuleRef, id: BinaryenIndex): usize;
723+
declare function _BinaryenCopyMemorySegmentData(module: BinaryenModuleRef, id: BinaryenIndex, buffer: usize): void;
703724

704725
declare function _BinaryenSetStart(module: BinaryenModuleRef, start: BinaryenFunctionRef): void;
705726

Diff for: src/module.ts

+13
Original file line numberDiff line numberDiff line change
@@ -333,16 +333,29 @@ export enum BinaryOp {
333333
SubSatI8x16 = _BinaryenSubSatSVecI8x16(),
334334
SubSatU8x16 = _BinaryenSubSatUVecI8x16(),
335335
MulI8x16 = _BinaryenMulVecI8x16(),
336+
MinI8x16 = _BinaryenMinSVecI8x16(),
337+
MinU8x16 = _BinaryenMinUVecI8x16(),
338+
MaxI8x16 = _BinaryenMaxSVecI8x16(),
339+
MaxU8x16 = _BinaryenMaxUVecI8x16(),
336340
AddI16x8 = _BinaryenAddVecI16x8(),
337341
AddSatI16x8 = _BinaryenAddSatSVecI16x8(),
338342
AddSatU16x8 = _BinaryenAddSatUVecI16x8(),
339343
SubI16x8 = _BinaryenSubVecI16x8(),
340344
SubSatI16x8 = _BinaryenSubSatSVecI16x8(),
341345
SubSatU16x8 = _BinaryenSubSatUVecI16x8(),
342346
MulI16x8 = _BinaryenMulVecI16x8(),
347+
MinI16x8 = _BinaryenMinSVecI16x8(),
348+
MinU16x8 = _BinaryenMinUVecI16x8(),
349+
MaxI16x8 = _BinaryenMaxSVecI16x8(),
350+
MaxU16x8 = _BinaryenMaxUVecI16x8(),
343351
AddI32x4 = _BinaryenAddVecI32x4(),
344352
SubI32x4 = _BinaryenSubVecI32x4(),
345353
MulI32x4 = _BinaryenMulVecI32x4(),
354+
MinI32x4 = _BinaryenMinSVecI32x4(),
355+
MinU32x4 = _BinaryenMinUVecI32x4(),
356+
MaxI32x4 = _BinaryenMaxSVecI32x4(),
357+
MaxU32x4 = _BinaryenMaxUVecI32x4(),
358+
DotI16x8 = _BinaryenDotSVecI16x8ToVecI32x4(),
346359
AddI64x2 = _BinaryenAddVecI64x2(),
347360
SubI64x2 = _BinaryenSubVecI64x2(),
348361
AddF32x4 = _BinaryenAddVecF32x4(),

Diff for: std/assembly/builtins.ts

+58-2
Original file line numberDiff line numberDiff line change
@@ -1091,11 +1091,15 @@ export namespace v128 {
10911091

10921092
// @ts-ignore: decorator
10931093
@builtin
1094-
export declare function min<T>(a: v128, b: v128): v128; // f32, f64 only
1094+
export declare function min<T>(a: v128, b: v128): v128;
10951095

10961096
// @ts-ignore: decorator
10971097
@builtin
1098-
export declare function max<T>(a: v128, b: v128): v128; // f32, f64 only
1098+
export declare function max<T>(a: v128, b: v128): v128;
1099+
1100+
// @ts-ignore: decorator
1101+
@builtin
1102+
export declare function dot<T>(a: v128, b: v128): v128; // i16 only
10991103

11001104
// @ts-ignore: decorator
11011105
@builtin
@@ -1195,6 +1199,22 @@ export namespace i8x16 {
11951199
@builtin
11961200
export declare function mul(a: v128, b: v128): v128;
11971201

1202+
// @ts-ignore: decorator
1203+
@builtin
1204+
export declare function min_s(a: v128, b: v128): v128;
1205+
1206+
// @ts-ignore: decorator
1207+
@builtin
1208+
export declare function min_u(a: v128, b: v128): v128;
1209+
1210+
// @ts-ignore: decorator
1211+
@builtin
1212+
export declare function max_s(a: v128, b: v128): v128;
1213+
1214+
// @ts-ignore: decorator
1215+
@builtin
1216+
export declare function max_u(a: v128, b: v128): v128;
1217+
11981218
// @ts-ignore: decorator
11991219
@builtin
12001220
export declare function neg(a: v128): v128;
@@ -1318,6 +1338,22 @@ export namespace i16x8 {
13181338
@builtin
13191339
export declare function mul(a: v128, b: v128): v128;
13201340

1341+
// @ts-ignore: decorator
1342+
@builtin
1343+
export declare function min_s(a: v128, b: v128): v128;
1344+
1345+
// @ts-ignore: decorator
1346+
@builtin
1347+
export declare function min_u(a: v128, b: v128): v128;
1348+
1349+
// @ts-ignore: decorator
1350+
@builtin
1351+
export declare function max_s(a: v128, b: v128): v128;
1352+
1353+
// @ts-ignore: decorator
1354+
@builtin
1355+
export declare function max_u(a: v128, b: v128): v128;
1356+
13211357
// @ts-ignore: decorator
13221358
@builtin
13231359
export declare function neg(a: v128): v128;
@@ -1461,6 +1497,26 @@ export namespace i32x4 {
14611497
@builtin
14621498
export declare function mul(a: v128, b: v128): v128;
14631499

1500+
// @ts-ignore: decorator
1501+
@builtin
1502+
export declare function min_s(a: v128, b: v128): v128;
1503+
1504+
// @ts-ignore: decorator
1505+
@builtin
1506+
export declare function min_u(a: v128, b: v128): v128;
1507+
1508+
// @ts-ignore: decorator
1509+
@builtin
1510+
export declare function max_s(a: v128, b: v128): v128;
1511+
1512+
// @ts-ignore: decorator
1513+
@builtin
1514+
export declare function max_u(a: v128, b: v128): v128;
1515+
1516+
// @ts-ignore: decorator
1517+
@builtin
1518+
export declare function dot_i16x8_s(a: v128, b: v128): v128;
1519+
14641520
// @ts-ignore: decorator
14651521
@builtin
14661522
export declare function neg(a: v128): v128;

0 commit comments

Comments
 (0)