summaryrefslogtreecommitdiff
path: root/system
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 /system
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 'system')
-rw-r--r--system/include/emscripten/vector.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/system/include/emscripten/vector.h b/system/include/emscripten/vector.h
index 938f2369..cf26a5d6 100644
--- a/system/include/emscripten/vector.h
+++ b/system/include/emscripten/vector.h
@@ -2,7 +2,7 @@
// Support for the JS SIMD API proposal, https://github.com/johnmccutchan/ecmascript_simd
typedef float float32x4 __attribute__((__vector_size__(16)));
-typedef unsigned int uint32x4 __attribute__((__vector_size__(16)));
+typedef unsigned int int32x4 __attribute__((__vector_size__(16)));
#ifdef __cplusplus
extern "C" {
@@ -10,6 +10,24 @@ extern "C" {
unsigned int emscripten_float32x4_signmask(float32x4 x);
+float32x4 emscripten_float32x4_min(float32x4 a, float32x4 b);
+float32x4 emscripten_float32x4_max(float32x4 a, float32x4 b);
+float32x4 emscripten_float32x4_sqrt(float32x4 a);
+float32x4 emscripten_float32x4_lessThan(float32x4 a, float32x4 b);
+float32x4 emscripten_float32x4_lessThanOrEqual(float32x4 a, float32x4 b);
+float32x4 emscripten_float32x4_equal(float32x4 a, float32x4 b);
+float32x4 emscripten_float32x4_greaterThanOrEqual(float32x4 a, float32x4 b);
+float32x4 emscripten_float32x4_greaterThan(float32x4 a, float32x4 b);
+float32x4 emscripten_float32x4_and(float32x4 a, float32x4 b);
+float32x4 emscripten_float32x4_andNot(float32x4 a, float32x4 b);
+float32x4 emscripten_float32x4_or(float32x4 a, float32x4 b);
+float32x4 emscripten_float32x4_xor(float32x4 a, float32x4 b);
+
+float32x4 emscripten_int32x4_bitsToFloat32x4(int32x4 a);
+float32x4 emscripten_int32x4_toFloat32x4(int32x4 a);
+int32x4 emscripten_float32x4_bitsToInt32x4(float32x4 a);
+int32x4 emscripten_float32x4_toInt32x4(float32x4 a);
+
#ifdef __cplusplus
}
#endif