diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-10-17 17:11:55 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-10-18 13:00:49 -0700 |
commit | f439b01a91e285e7b5699b67c4031b776245e4f9 (patch) | |
tree | ae8e038e102caa80c4ad79ed4dc0e239d7a22236 /src | |
parent | 775e1fa06246a6724bd9573ba8104439998c4163 (diff) |
add basic float simd calls
Diffstat (limited to 'src')
-rw-r--r-- | src/parseTools.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index 3456e18d..eb2b2210 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -2331,6 +2331,10 @@ function processMathop(item) { if (type[0] === '<' && type[type.length-1] !== '*') { // vector/SIMD operation switch (op) { + case 'fadd': return 'SIMD.add(' + idents[0] + ',' + idents[1] + ')'; + case 'fsub': return 'SIMD.sub(' + idents[0] + ',' + idents[1] + ')'; + case 'fmul': return 'SIMD.mul(' + idents[0] + ',' + idents[1] + ')'; + case 'fdiv': return 'SIMD.div(' + idents[0] + ',' + idents[1] + ')'; default: throw 'vector op todo: ' + dump(item); } } |