Skip to content

Fix bitselect operation in C/JS APIs #2336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ CMakeFiles
/*.VC.opendb
/Win32/

# files commonly related to building out-of-tree
/build/

# macOS
.DS_Store

Expand Down
3 changes: 1 addition & 2 deletions build-js.sh
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ export_function "_BinaryenNotVec128"
export_function "_BinaryenAndVec128"
export_function "_BinaryenOrVec128"
export_function "_BinaryenXorVec128"
export_function "_BinaryenBitselectVec128"
export_function "_BinaryenNegVecI8x16"
export_function "_BinaryenAnyTrueVecI8x16"
export_function "_BinaryenAllTrueVecI8x16"
Expand Down Expand Up @@ -524,8 +525,6 @@ export_function "_BinaryenNegVecF32x4"
export_function "_BinaryenSqrtVecF32x4"
export_function "_BinaryenQFMAVecF32x4"
export_function "_BinaryenQFMSVecF32x4"
export_function "_BinaryenQFMAVecF32x4"
export_function "_BinaryenQFMSVecF32x4"
export_function "_BinaryenAddVecF32x4"
export_function "_BinaryenSubVecF32x4"
export_function "_BinaryenMulVecF32x4"
Expand Down
1 change: 1 addition & 0 deletions src/binaryen-c.h
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ BinaryenOp BinaryenNotVec128(void);
BinaryenOp BinaryenAndVec128(void);
BinaryenOp BinaryenOrVec128(void);
BinaryenOp BinaryenXorVec128(void);
BinaryenOp BinaryenBitselectVec128(void);
BinaryenOp BinaryenNegVecI8x16(void);
BinaryenOp BinaryenAnyTrueVecI8x16(void);
BinaryenOp BinaryenAllTrueVecI8x16(void);
Expand Down
3 changes: 2 additions & 1 deletion src/js/binaryen.js-post.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ Module['NotVec128'] = Module['_BinaryenNotVec128']();
Module['AndVec128'] = Module['_BinaryenAndVec128']();
Module['OrVec128'] = Module['_BinaryenOrVec128']();
Module['XorVec128'] = Module['_BinaryenXorVec128']();
Module['BitselectVec128'] = Module['_BinaryenBitselectVec128']();
Module['NegVecI8x16'] = Module['_BinaryenNegVecI8x16']();
Module['AnyTrueVecI8x16'] = Module['_BinaryenAnyTrueVecI8x16']();
Module['AllTrueVecI8x16'] = Module['_BinaryenAllTrueVecI8x16']();
Expand Down Expand Up @@ -1327,7 +1328,7 @@ function wrapModule(module, self) {
return Module['_BinaryenUnary'](module, Module['XorVec128'], value);
},
'bitselect': function(left, right, cond) {
return Module['_BinaryenSIMDTernary'](module, Module['Bitselect'], left, right, cond);
return Module['_BinaryenSIMDTernary'](module, Module['BitselectVec128'], left, right, cond);
},
'pop': function() {
return Module['_BinaryenPop'](module, Module['v128']);
Expand Down