diff options
author | Daniel Wirtz <dcode@dcode.io> | 2018-05-07 23:29:36 +0200 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2018-05-07 14:29:36 -0700 |
commit | 691cde4c8bed1a3694b6ae97160843736a204a1e (patch) | |
tree | 85a36d066d0ec2a2e2c29dc4129c046f14354c47 /src/js | |
parent | dbe49a6238f8a8df2d1a648fe0659916aad00c35 (diff) | |
download | binaryen-691cde4c8bed1a3694b6ae97160843736a204a1e.tar.gz binaryen-691cde4c8bed1a3694b6ae97160843736a204a1e.tar.bz2 binaryen-691cde4c8bed1a3694b6ae97160843736a204a1e.zip |
Expose sign extension ops in Binaryen-C/.js (#1534)
Diffstat (limited to 'src/js')
-rw-r--r-- | src/js/binaryen.js-post.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js index e9b4039f7..fbabfe995 100644 --- a/src/js/binaryen.js-post.js +++ b/src/js/binaryen.js-post.js @@ -115,6 +115,11 @@ Module['PromoteFloat32'] = Module['_BinaryenPromoteFloat32'](); Module['DemoteFloat64'] = Module['_BinaryenDemoteFloat64'](); Module['ReinterpretInt32'] = Module['_BinaryenReinterpretInt32'](); Module['ReinterpretInt64'] = Module['_BinaryenReinterpretInt64'](); +Module['ExtendS8Int32'] = Module['_BinaryenExtendS8Int32'](); +Module['ExtendS16Int32'] = Module['_BinaryenExtendS16Int32'](); +Module['ExtendS8Int64'] = Module['_BinaryenExtendS8Int64'](); +Module['ExtendS16Int64'] = Module['_BinaryenExtendS16Int64'](); +Module['ExtendS32Int64'] = Module['_BinaryenExtendS32Int64'](); Module['AddInt32'] = Module['_BinaryenAddInt32'](); Module['SubInt32'] = Module['_BinaryenSubInt32'](); Module['MulInt32'] = Module['_BinaryenMulInt32'](); @@ -349,6 +354,12 @@ Module['Module'] = function(module) { 'reinterpret': function(value) { return Module['_BinaryenUnary'](module, Module['ReinterpretFloat32'], value); }, + 'extend8_s': function(value) { + return Module['_BinaryenUnary'](module, Module['ExtendS8Int32'], value); + }, + 'extend16_s': function(value) { + return Module['_BinaryenUnary'](module, Module['ExtendS16Int32'], value); + }, 'wrap': function(value) { return Module['_BinaryenUnary'](module, Module['WrapInt64'], value); }, @@ -590,6 +601,15 @@ Module['Module'] = function(module) { 'reinterpret': function(value) { return Module['_BinaryenUnary'](module, Module['ReinterpretFloat64'], value); }, + 'extend8_s': function(value) { + return Module['_BinaryenUnary'](module, Module['ExtendS8Int64'], value); + }, + 'extend16_s': function(value) { + return Module['_BinaryenUnary'](module, Module['ExtendS16Int64'], value); + }, + 'extend32_s': function(value) { + return Module['_BinaryenUnary'](module, Module['ExtendS32Int64'], value); + }, 'extend_s': function(value) { return Module['_BinaryenUnary'](module, Module['ExtendSInt32'], value); }, |