aboutsummaryrefslogtreecommitdiff
path: root/src/settings.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings.js')
-rw-r--r--src/settings.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/settings.js b/src/settings.js
index ba1f6a83..8766277b 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -17,8 +17,8 @@ var QUANTUM_SIZE = 4; // This is the size of an individual field in a structure.
//
// Changing this from the default of 4 is deprecated.
-var TARGET_X86 = 1; // For le32-unknown-nacl
-var TARGET_LE32 = 0; // For i386-pc-linux-gnu
+var TARGET_X86 = 0; // For i386-pc-linux-gnu
+var TARGET_LE32 = 1; // For le32-unknown-nacl
var CORRECT_SIGNS = 1; // Whether we make sure to convert unsigned values to signed values.
// Decreases performance with additional runtime checks. Might not be
@@ -89,6 +89,12 @@ var UNALIGNED_MEMORY = 0; // If enabled, all memory accesses are assumed to be u
// 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 FORCE_ALIGNED_MEMORY = 0; // If enabled, assumes all reads and writes are fully aligned for the type they
+ // use. This is true in proper C code (no undefined behavior), but is sadly
+ // common enough that we can't do it by default. See SAFE_HEAP and CHECK_HEAP_ALIGN
+ // for ways to help find places in your code where unaligned reads/writes are done -
+ // you might be able to refactor your codebase to prevent them, which leads to
+ // smaller and faster code, or even the option to turn this flag on.
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