aboutsummaryrefslogtreecommitdiff
path: root/src/jsifier.js
diff options
context:
space:
mode:
authorHeidi Pan <heidi.pan@intel.com>2013-11-04 19:01:59 -0800
committerHeidi Pan <heidi.pan@intel.com>2013-11-26 14:59:02 -0800
commit05de00315488a0a17984a472e6e6bbc4000a1e76 (patch)
treeaaba4870563a0c37227287e787ea38b6fc7f115b /src/jsifier.js
parent29906a675d9da025fc428d1cb95ed1a0f7bfb691 (diff)
getting some initial set of x86 intrinsics mapped to JS SIMD ops; update existing SIMD code to use updated JS SIMD API (SIMD.type.op instead of SIMD.op & SIMD.opu32; int32x4 instead of uint32x4); bug fix: right type of withX() for int32x4 initialization; bug fix: splat(0) instead of zero() for int32x4 initialization
Diffstat (limited to 'src/jsifier.js')
-rw-r--r--src/jsifier.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index cb753e57..fb6c5ba8 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -1373,8 +1373,9 @@ function JSify(data, functionsOnly, givenFunctions) {
function insertelementHandler(item) {
var base = getVectorBaseType(item.type);
var ident = ensureVector(item.ident, base);
+ var laneOp = ((base == 'float') ? 'SIMD.float32x4.with' : 'SIMD.int32x4.with');
//return ident + '.with' + SIMDLane[finalizeLLVMParameter(item.index)] + '(' + finalizeLLVMParameter(item.value) + ')';
- return 'SIMD.with' + SIMDLane[finalizeLLVMParameter(item.index)] + '(' + ident + ',' + finalizeLLVMParameter(item.value) + ')';
+ return laneOp + SIMDLane[finalizeLLVMParameter(item.index)] + '(' + ident + ',' + finalizeLLVMParameter(item.value) + ')';
}
function extractelementHandler(item) {
var base = getVectorBaseType(item.type);