aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/library.js7
-rw-r--r--src/parseTools.js2
-rw-r--r--src/settings.js1
-rwxr-xr-xtools/emmaken.py2
4 files changed, 10 insertions, 2 deletions
diff --git a/src/library.js b/src/library.js
index b837778c..d87fea6d 100644
--- a/src/library.js
+++ b/src/library.js
@@ -2011,6 +2011,13 @@ var Library = {
return ret + boundary - (ret % boundary);
},
+ posix_memalign__deps: ['memalign'],
+ posix_memalign: function(memptr, alignment, size) {
+ var ptr = _memalign(alignment, size);
+ {{{ makeSetValue('memptr', '0', 'ptr', 'i8*') }}}
+ return 0;
+ },
+
// ==========================================================================
// dirent.h
// ==========================================================================
diff --git a/src/parseTools.js b/src/parseTools.js
index 8c8389fb..afd57543 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -473,7 +473,7 @@ function IEEEUnHex(stringy) {
stringy = stringy.substr(2); // leading '0x';
if (stringy.replace(/0/g, '') === '') return 0;
while (stringy.length < 16) stringy = '0' + stringy;
- assert(stringy.length === 16, 'Can only undex 16-digit double numbers, nothing platform-specific');
+ assert(stringy.length === 16, 'Can only unhex 16-digit double numbers, nothing platform-specific');
var top = eval('0x' + stringy[0]);
var neg = !!(top & 8); // sign
if (neg) {
diff --git a/src/settings.js b/src/settings.js
index 437d61b5..544cc7c2 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -46,6 +46,7 @@ USE_TYPED_ARRAYS = 0; // Try to use typed arrays for the heap
// simply because double stores are not necessarily 64-bit aligned, and we can only access
// 64-bit aligned values with a 64-bit typed array. Likewise int64s are stored as int32's,
// which is potentially very dangerous!
+ // TODO: require compiling with -malign-double, which does align doubles
SKIP_STACK_IN_SMALL = 1; // When enabled, does not push/pop the stack at all in
// functions that have no basic stack usage. But, they
// may allocate stack later, and in a loop, this can be
diff --git a/tools/emmaken.py b/tools/emmaken.py
index 0d33c525..dea8194e 100755
--- a/tools/emmaken.py
+++ b/tools/emmaken.py
@@ -85,7 +85,7 @@ try:
sys.argv = sys.argv[:-1]
CC_ARG_SKIP = ['-O1', '-O2', '-O3']
- CC_ADDITIONAL_ARGS = ['-m32', '-U__i386__', '-U__x86_64__', '-U__SSE__', '-UX87_DOUBLE_ROUNDING', '-UHAVE_GCC_ASM_FOR_X87']
+ CC_ADDITIONAL_ARGS = ['-m32', '-U__i386__', '-U__x86_64__', '-U__i386', '-U__x86_64', '-U__SSE__', '-U__SSE2__', '-UX87_DOUBLE_ROUNDING', '-UHAVE_GCC_ASM_FOR_X87']
ALLOWED_LINK_ARGS = ['-f', '-help', '-o', '-print-after', '-print-after-all', '-print-before',
'-print-before-all', '-time-passes', '-v', '-verify-dom-info', '-version' ]
DISALLOWED_LINK_ARGS = []#['rc']