diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-10-16 18:40:27 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-10-17 12:44:21 -0700 |
commit | ee500a3d942327563451bfc81dee0a3044a3cb7e (patch) | |
tree | d5674ccc751f4e004b15b025929a88e6e6e005d7 /src/settings.js | |
parent | a2b4acbd95c1f307d0d51bfd0134f6a88a087c46 (diff) |
UNALIGNED_MEMORY option to emulate unaligned reads/writes all the time, to support some nonportable code
Diffstat (limited to 'src/settings.js')
-rw-r--r-- | src/settings.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/settings.js b/src/settings.js index 0b58a26f..5b1968b9 100644 --- a/src/settings.js +++ b/src/settings.js @@ -72,6 +72,10 @@ var DOUBLE_MODE = 1; // How to load and store 64-bit doubles. Without typed arra // then load it aligned, and that load-store will make JS engines alter it if it is being // stored to a typed array for security reasons. That will 'fix' the number from being a // NaN or an infinite number. +var UNALIGNED_MEMORY = 0; // If enabled, all memory accesses are assumed to be unaligned. (This only matters in + // typed arrays mode 2 where alignment is relevant.) In unaligned memory mode, you + // can run nonportable code that typically would break in JS (or on ARM for that + // matter, which also cannot do unaligned reads/writes), at the cost of slowness var PRECISE_I64_MATH = 1; // If enabled, i64 addition etc. is emulated - which is slow but precise. If disabled, // we use the 'double trick' which is fast but incurs rounding at high values. // Note that we do not catch 32-bit multiplication by default (which must be done in |