diff options
author | Derek Schuff <dschuff@chromium.org> | 2016-04-06 11:58:55 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-04-06 11:58:55 -0700 |
commit | 62c07b549d14dfb974f73554026f0b9fff365968 (patch) | |
tree | 93eedaee3158cbb44748041c50f466641bc42a48 | |
parent | c885ca69d19e7bd2c58b44eef242de334ac8c9dd (diff) | |
download | binaryen-62c07b549d14dfb974f73554026f0b9fff365968.tar.gz binaryen-62c07b549d14dfb974f73554026f0b9fff365968.tar.bz2 binaryen-62c07b549d14dfb974f73554026f0b9fff365968.zip |
Properly align the stack pointer
* Properly align the stack pointer
By default (if no global base is given) the global base is 1, which
seems wrong. In this case the stack pointer gets an address of 1, which
is unaligned and definitely wrong. So, start the global base at 0 instead of
1 by default and align the stack pointer. Also factor allocation of
statics into a function.
* unconditionally allocate stack pointer; explicitly reserve address 0
74 files changed, 308 insertions, 206 deletions
diff --git a/auto_update_tests.py b/auto_update_tests.py index f4f8d0c1d..f0cba64ef 100755 --- a/auto_update_tests.py +++ b/auto_update_tests.py @@ -30,7 +30,8 @@ for dot_s_dir in ['dot_s', 'llvm_autogenerated']: print '..', s wasm = s.replace('.s', '.wast') full = os.path.join('test', dot_s_dir, s) - cmd = [os.path.join('bin', 's2wasm'), full] + stack_alloc = ['--allocate-stack=1024'] if dot_s_dir == 'llvm_autogenerated' else [] + cmd = [os.path.join('bin', 's2wasm'), full] + stack_alloc if s.startswith('start_'): cmd.append('--start') actual, err = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() @@ -475,7 +475,8 @@ for dot_s_dir in ['dot_s', 'llvm_autogenerated']: print '..', s wasm = s.replace('.s', '.wast') full = os.path.join('test', dot_s_dir, s) - cmd = [os.path.join('bin', 's2wasm'), full] + stack_alloc = ['--allocate-stack=1024'] if dot_s_dir == 'llvm_autogenerated' else [] + cmd = [os.path.join('bin', 's2wasm'), full] + stack_alloc if s.startswith('start_'): cmd.append('--start') actual, err = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() @@ -491,7 +492,7 @@ for dot_s_dir in ['dot_s', 'llvm_autogenerated']: fail(actual, expected) # verify with options - proc = subprocess.Popen([os.path.join('bin', 's2wasm'), full, '--global-base=1024'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + proc = subprocess.Popen([os.path.join('bin', 's2wasm'), full, '--global-base=1024'] + stack_alloc, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = proc.communicate() assert proc.returncode == 0, err diff --git a/src/s2wasm-main.cpp b/src/s2wasm-main.cpp index 80284975b..d26ef3f1c 100644 --- a/src/s2wasm-main.cpp +++ b/src/s2wasm-main.cpp @@ -80,7 +80,7 @@ int main(int argc, const char *argv[]) { AllocatingModule wasm; uint64_t globalBase = options.extra.find("global-base") != options.extra.end() ? std::stoull(options.extra["global-base"]) - : 1; + : 0; uint64_t stackAllocation = options.extra.find("stack-allocation") != options.extra.end() ? std::stoull(options.extra["stack-allocation"]) diff --git a/src/s2wasm.h b/src/s2wasm.h index 2938cfae7..19b3db79d 100644 --- a/src/s2wasm.h +++ b/src/s2wasm.h @@ -58,7 +58,6 @@ class S2WasmBuilder { startFunction(startFunction), globalBase(globalBase), nextStatic(globalBase), - minInitialMemory(0), userInitialMemory(userInitialMemory), userMaxMemory(userMaxMemory) { if (userMaxMemory && userMaxMemory < userInitialMemory) { @@ -74,13 +73,15 @@ class S2WasmBuilder { s = input; scan(); s = input; + // Don't allow anything to be allocated at address 0 + if (globalBase == 0) nextStatic = 1; // Place the stack pointer at the bottom of the linear memory, to keep its // address small (and thus with a small encoding). placeStackPointer(stackAllocation); process(); // Place the stack after the user's static data, to keep those addresses // small. - if (stackAllocation) placeStack(stackAllocation); + if (stackAllocation) allocateStatic(stackAllocation, 16, ".stack"); fix(); } @@ -90,7 +91,6 @@ class S2WasmBuilder { size_t globalBase, // where globals can start to be statically allocated, i.e., the data segment nextStatic; // location of next static allocation std::map<Name, int32_t> staticAddresses; // name => address - size_t minInitialMemory; // Minimum initial size (in bytes) of memory. size_t userInitialMemory; // Initial memory size (in bytes) specified by the user. size_t userMaxMemory; // Max memory size (in bytes) specified by the user. //(after linking, this is rounded and set on the wasm object in pages) @@ -420,32 +420,30 @@ class S2WasmBuilder { } } + // Allocate a static variable and return its address in linear memory + size_t allocateStatic(size_t allocSize, size_t alignment, Name name) { + size_t address = alignAddr(nextStatic, alignment); + staticAddresses[name] = address; + nextStatic = address + allocSize; + return address; + } + void placeStackPointer(size_t stackAllocation) { - assert(nextStatic == globalBase); // we are the first allocation - // Allocate space for the stack pointer - staticAddresses["__stack_pointer"] = nextStatic; + assert(nextStatic == globalBase || nextStatic == 1); // we are the first allocation const size_t pointerSize = 4; + // Unconditionally allocate space for the stack pointer. Emscripten + // allocates the stack itself, and initializes the stack pointer itself. + size_t address = allocateStatic(pointerSize, pointerSize, "__stack_pointer"); if (stackAllocation) { - // If we are also allocating the stack, initialize the stack pointer to - // point to one past-the-end of the stack allocation. + // If we are allocating the stack, set up a relocation to initialize the + // stack pointer to point to one past-the-end of the stack allocation. auto* raw = new uint32_t; relocations.emplace_back(raw, ".stack", stackAllocation); assert(wasm.memory.segments.size() == 0); - addressSegments[nextStatic] = wasm.memory.segments.size(); + addressSegments[address] = wasm.memory.segments.size(); wasm.memory.segments.emplace_back( - nextStatic, reinterpret_cast<char*>(raw), pointerSize); - minInitialMemory = nextStatic + pointerSize; + address, reinterpret_cast<char*>(raw), pointerSize); } - nextStatic += pointerSize; - } - - void placeStack(size_t stackAllocation) { - // Allocate space for a user stack. It starts zeroed-out so needs no segment - // Round to a 16-byte aligned address. - nextStatic = (nextStatic + 15) & static_cast<size_t>(-16); - staticAddresses[".stack"] = nextStatic; - nextStatic += stackAllocation; - minInitialMemory = nextStatic; } void process() { @@ -1200,14 +1198,11 @@ class S2WasmBuilder { relocations[r].data = (uint32_t*)&(*raw)[i]; } // assign the address, add to memory - while (nextStatic % align) nextStatic++; - staticAddresses[name] = nextStatic; + size_t address = allocateStatic(size, align, name); if (!zero) { - addressSegments[nextStatic] = wasm.memory.segments.size(); - wasm.memory.segments.emplace_back(nextStatic, (const char*)&(*raw)[0], size); + addressSegments[address] = wasm.memory.segments.size(); + wasm.memory.segments.emplace_back(address, (const char*)&(*raw)[0], size); } - nextStatic += size; - minInitialMemory = nextStatic; } void parseLcomm(Name name, size_t align=1) { @@ -1218,10 +1213,7 @@ class S2WasmBuilder { skipComma(); getInt(); } - while (nextStatic % align) nextStatic++; - staticAddresses[name] = nextStatic; - nextStatic += size; - minInitialMemory = nextStatic; + allocateStatic(size, align, name); } void skipImports() { @@ -1240,9 +1232,10 @@ class S2WasmBuilder { } void fix() { - // Round the memory size up to a page, and update the page-increment versions + // The minimum initial memory size is the amount of static variables we have + // allocated. Round it up to a page, and update the page-increment versions // of initial and max - size_t initialMem = roundUpToPageSize(minInitialMemory); + size_t initialMem = roundUpToPageSize(nextStatic); if (userInitialMemory) { if (initialMem > userInitialMemory) { Fatal() << "Specified initial memory size " << userInitialMemory << diff --git a/src/support/utilities.h b/src/support/utilities.h index 77263a78e..d35b2b34a 100644 --- a/src/support/utilities.h +++ b/src/support/utilities.h @@ -35,6 +35,19 @@ inline Destination bit_cast(const Source& source) { return destination; } +inline bool isPowerOf2(uint32_t v) { + return v && !(v & (v - 1)); +} + +inline size_t alignAddr(size_t address, size_t alignment) { + assert(alignment && isPowerOf2((uint32_t)alignment) && + "Alignment is not a power of two!"); + + assert(address + alignment - 1 >= address); + + return ((address + alignment - 1) & ~(alignment - 1)); +} + } // namespace wasm #endif // wasm_support_utilities_h diff --git a/test/dot_s/alias.wast b/test/dot_s/alias.wast index 5dc2440fe..fe8c89586 100644 --- a/test/dot_s/alias.wast +++ b/test/dot_s/alias.wast @@ -1,5 +1,5 @@ (module - (memory 0) + (memory 1) (export "memory" memory) (export "__exit" $__exit) (export "__needs_exit" $__needs_exit) @@ -12,4 +12,4 @@ (return) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 8, "initializers": [] } diff --git a/test/dot_s/alternate-lcomm.wast b/test/dot_s/alternate-lcomm.wast index 8c046c709..7b6bccb9a 100644 --- a/test/dot_s/alternate-lcomm.wast +++ b/test/dot_s/alternate-lcomm.wast @@ -2,4 +2,4 @@ (memory 1) (export "memory" memory) ) -;; METADATA: { "asmConsts": {},"staticBump": 8, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 12, "initializers": [] } diff --git a/test/dot_s/asm_const.wast b/test/dot_s/asm_const.wast index b56d7da88..ec9389029 100644 --- a/test/dot_s/asm_const.wast +++ b/test/dot_s/asm_const.wast @@ -15,4 +15,4 @@ ) ) ) -;; METADATA: { "asmConsts": {"0": ["{ Module.print(\"hello, world!\"); }", ["vi"]]},"staticBump": 50, "initializers": [] } +;; METADATA: { "asmConsts": {"0": ["{ Module.print(\"hello, world!\"); }", ["vi"]]},"staticBump": 51, "initializers": [] } diff --git a/test/dot_s/basics.wast b/test/dot_s/basics.wast index 4f8ee2087..cc1af6c6e 100644 --- a/test/dot_s/basics.wast +++ b/test/dot_s/basics.wast @@ -92,4 +92,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 51, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 52, "initializers": [] } diff --git a/test/dot_s/bcp-1.wast b/test/dot_s/bcp-1.wast index 255d40b7d..13f113932 100644 --- a/test/dot_s/bcp-1.wast +++ b/test/dot_s/bcp-1.wast @@ -306,4 +306,4 @@ (unreachable) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 103, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 104, "initializers": [] } diff --git a/test/dot_s/data-offset-folding.wast b/test/dot_s/data-offset-folding.wast index e29612b19..f2725dae0 100644 --- a/test/dot_s/data-offset-folding.wast +++ b/test/dot_s/data-offset-folding.wast @@ -5,4 +5,4 @@ ) (export "memory" memory) ) -;; METADATA: { "asmConsts": {},"staticBump": 419, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 420, "initializers": [] } diff --git a/test/dot_s/exit.wast b/test/dot_s/exit.wast index 92955d997..7f42f2b59 100644 --- a/test/dot_s/exit.wast +++ b/test/dot_s/exit.wast @@ -1,5 +1,5 @@ (module - (memory 0) + (memory 1) (export "memory" memory) (type $FUNCSIG$vi (func (param i32))) (import $exit "env" "exit" (param i32)) @@ -11,4 +11,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 8, "initializers": [] } diff --git a/test/dot_s/function-data-sections.wast b/test/dot_s/function-data-sections.wast index 01af72d17..5486fcefb 100644 --- a/test/dot_s/function-data-sections.wast +++ b/test/dot_s/function-data-sections.wast @@ -25,4 +25,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 19, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 20, "initializers": [] } diff --git a/test/dot_s/initializers.wast b/test/dot_s/initializers.wast index 34a4ee1e1..754d11be6 100644 --- a/test/dot_s/initializers.wast +++ b/test/dot_s/initializers.wast @@ -1,5 +1,5 @@ (module - (memory 0) + (memory 1) (export "memory" memory) (export "main" $main) (export "f2" $f2) @@ -12,4 +12,4 @@ (return) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": ["main", "f2", ] } +;; METADATA: { "asmConsts": {},"staticBump": 8, "initializers": ["main", "f2", ] } diff --git a/test/dot_s/lcomm-in-text-segment.wast b/test/dot_s/lcomm-in-text-segment.wast index 1ffe2b172..c642c2edd 100644 --- a/test/dot_s/lcomm-in-text-segment.wast +++ b/test/dot_s/lcomm-in-text-segment.wast @@ -1,7 +1,7 @@ (module (memory 1 - (segment 16 "\t\00\00\00") + (segment 16 "\0c\00\00\00") ) (export "memory" memory) ) -;; METADATA: { "asmConsts": {},"staticBump": 19, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 20, "initializers": [] } diff --git a/test/dot_s/macClangMetaData.wast b/test/dot_s/macClangMetaData.wast index 828c457b1..032f78620 100644 --- a/test/dot_s/macClangMetaData.wast +++ b/test/dot_s/macClangMetaData.wast @@ -15,4 +15,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 29, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 30, "initializers": [] } diff --git a/test/dot_s/memops.wast b/test/dot_s/memops.wast index 14090d602..124cafd68 100644 --- a/test/dot_s/memops.wast +++ b/test/dot_s/memops.wast @@ -205,4 +205,4 @@ ) ) ) -;; METADATA: { "asmConsts": {"0": ["{ Module.print(\"hello, world! \" + HEAP32[8>>2]); }", ["vi"]]},"staticBump": 66, "initializers": [] } +;; METADATA: { "asmConsts": {"0": ["{ Module.print(\"hello, world! \" + HEAP32[8>>2]); }", ["vi"]]},"staticBump": 67, "initializers": [] } diff --git a/test/dot_s/minimal.wast b/test/dot_s/minimal.wast index 16bfec364..8ab612528 100644 --- a/test/dot_s/minimal.wast +++ b/test/dot_s/minimal.wast @@ -1,5 +1,5 @@ (module - (memory 0) + (memory 1) (export "memory" memory) (export "main" $main) (func $main (result i32) @@ -8,4 +8,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 8, "initializers": [] } diff --git a/test/dot_s/permute.wast b/test/dot_s/permute.wast index 74decd3bf..13abcf66c 100644 --- a/test/dot_s/permute.wast +++ b/test/dot_s/permute.wast @@ -4,4 +4,4 @@ ) (export "memory" memory) ) -;; METADATA: { "asmConsts": {},"staticBump": 271, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 272, "initializers": [] } diff --git a/test/dot_s/relocation.wast b/test/dot_s/relocation.wast index 17d5345e9..c27b1642c 100644 --- a/test/dot_s/relocation.wast +++ b/test/dot_s/relocation.wast @@ -14,4 +14,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 15, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 16, "initializers": [] } diff --git a/test/dot_s/start_main0.wast b/test/dot_s/start_main0.wast index 4336fa530..2aac0aae2 100644 --- a/test/dot_s/start_main0.wast +++ b/test/dot_s/start_main0.wast @@ -1,5 +1,5 @@ (module - (memory 0) + (memory 1) (export "memory" memory) (start $_start) (export "main" $main) @@ -10,4 +10,4 @@ (call $main) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 8, "initializers": [] } diff --git a/test/dot_s/start_main2.wast b/test/dot_s/start_main2.wast index bf6a5296e..cde185bdd 100644 --- a/test/dot_s/start_main2.wast +++ b/test/dot_s/start_main2.wast @@ -1,5 +1,5 @@ (module - (memory 0) + (memory 1) (export "memory" memory) (start $_start) (export "main" $main) @@ -18,4 +18,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 8, "initializers": [] } diff --git a/test/dot_s/symbolic-offset.wast b/test/dot_s/symbolic-offset.wast index ede3ffead..0e129f31d 100644 --- a/test/dot_s/symbolic-offset.wast +++ b/test/dot_s/symbolic-offset.wast @@ -12,4 +12,4 @@ (return) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 19, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 20, "initializers": [] } diff --git a/test/dot_s/visibilities.wast b/test/dot_s/visibilities.wast index 5c0cd2f7a..422ff37b2 100644 --- a/test/dot_s/visibilities.wast +++ b/test/dot_s/visibilities.wast @@ -1,5 +1,5 @@ (module - (memory 0) + (memory 1) (export "memory" memory) (export "foo" $foo) (export "bar" $bar) @@ -14,4 +14,4 @@ (return) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 8, "initializers": [] } diff --git a/test/llvm_autogenerated/byval.wast b/test/llvm_autogenerated/byval.wast index a41ad7e57..82c43ea1a 100644 --- a/test/llvm_autogenerated/byval.wast +++ b/test/llvm_autogenerated/byval.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (type $FUNCSIG$vi (func (param i32))) (import $ext_byval_func "env" "ext_byval_func" (param i32)) @@ -19,7 +21,7 @@ (local $$4 i32) (local $$5 i32) (set_local $$1 - (i32.const 1) + (i32.const 4) ) (set_local $$1 (i32.load @@ -36,7 +38,7 @@ ) ) (set_local $$2 - (i32.const 1) + (i32.const 4) ) (set_local $$5 (i32.store @@ -72,7 +74,7 @@ ) ) (set_local $$3 - (i32.const 1) + (i32.const 4) ) (set_local $$5 (i32.store @@ -89,7 +91,7 @@ (local $$4 i32) (local $$5 i32) (set_local $$1 - (i32.const 1) + (i32.const 4) ) (set_local $$1 (i32.load @@ -106,7 +108,7 @@ ) ) (set_local $$2 - (i32.const 1) + (i32.const 4) ) (set_local $$5 (i32.store @@ -142,7 +144,7 @@ ) ) (set_local $$3 - (i32.const 1) + (i32.const 4) ) (set_local $$5 (i32.store @@ -158,7 +160,7 @@ (local $$3 i32) (local $$4 i32) (set_local $$1 - (i32.const 1) + (i32.const 4) ) (set_local $$1 (i32.load @@ -175,7 +177,7 @@ ) ) (set_local $$2 - (i32.const 1) + (i32.const 4) ) (set_local $$4 (i32.store @@ -214,7 +216,7 @@ ) ) (set_local $$3 - (i32.const 1) + (i32.const 4) ) (set_local $$4 (i32.store @@ -235,7 +237,7 @@ (local $$8 i32) (local $$9 i32) (set_local $$1 - (i32.const 1) + (i32.const 4) ) (set_local $$1 (i32.load @@ -252,7 +254,7 @@ ) ) (set_local $$2 - (i32.const 1) + (i32.const 4) ) (set_local $$9 (i32.store @@ -372,7 +374,7 @@ ) ) (set_local $$3 - (i32.const 1) + (i32.const 4) ) (set_local $$9 (i32.store @@ -389,4 +391,4 @@ (return) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/call.wast b/test/llvm_autogenerated/call.wast index 53d890e74..d7142a446 100644 --- a/test/llvm_autogenerated/call.wast +++ b/test/llvm_autogenerated/call.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$j (func (result i64))) @@ -92,4 +94,4 @@ (return) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/cfg-stackify.wast b/test/llvm_autogenerated/cfg-stackify.wast index ef269b3f0..36c3e389b 100644 --- a/test/llvm_autogenerated/cfg-stackify.wast +++ b/test/llvm_autogenerated/cfg-stackify.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) @@ -946,4 +948,4 @@ (return) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/comparisons_f32.wast b/test/llvm_autogenerated/comparisons_f32.wast index d5d723e97..cf50ff5fa 100644 --- a/test/llvm_autogenerated/comparisons_f32.wast +++ b/test/llvm_autogenerated/comparisons_f32.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "ord_f32" $ord_f32) (export "uno_f32" $uno_f32) @@ -212,4 +214,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/comparisons_f64.wast b/test/llvm_autogenerated/comparisons_f64.wast index 130114d29..d2af5822e 100644 --- a/test/llvm_autogenerated/comparisons_f64.wast +++ b/test/llvm_autogenerated/comparisons_f64.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "ord_f64" $ord_f64) (export "uno_f64" $uno_f64) @@ -212,4 +214,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/comparisons_i32.wast b/test/llvm_autogenerated/comparisons_i32.wast index b5cb352f7..6664e214a 100644 --- a/test/llvm_autogenerated/comparisons_i32.wast +++ b/test/llvm_autogenerated/comparisons_i32.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "eq_i32" $eq_i32) (export "ne_i32" $ne_i32) @@ -92,4 +94,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/comparisons_i64.wast b/test/llvm_autogenerated/comparisons_i64.wast index 969160686..ea1c2c607 100644 --- a/test/llvm_autogenerated/comparisons_i64.wast +++ b/test/llvm_autogenerated/comparisons_i64.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "eq_i64" $eq_i64) (export "ne_i64" $ne_i64) @@ -92,4 +94,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/conv.wast b/test/llvm_autogenerated/conv.wast index 1dc745714..a537d8371 100644 --- a/test/llvm_autogenerated/conv.wast +++ b/test/llvm_autogenerated/conv.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "i32_wrap_i64" $i32_wrap_i64) (export "i64_extend_s_i32" $i64_extend_s_i32) @@ -213,4 +215,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/copysign-casts.wast b/test/llvm_autogenerated/copysign-casts.wast index 9b6bbe601..bb6a5f214 100644 --- a/test/llvm_autogenerated/copysign-casts.wast +++ b/test/llvm_autogenerated/copysign-casts.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "fold_promote" $fold_promote) (export "fold_demote" $fold_demote) @@ -24,4 +26,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/cpus.wast b/test/llvm_autogenerated/cpus.wast index eebfa6c79..ecddf0c98 100644 --- a/test/llvm_autogenerated/cpus.wast +++ b/test/llvm_autogenerated/cpus.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "f" $f) (func $f (param $$0 i32) (result i32) @@ -8,4 +10,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/dead-vreg.wast b/test/llvm_autogenerated/dead-vreg.wast index 1fd3f24bb..69c5dde27 100644 --- a/test/llvm_autogenerated/dead-vreg.wast +++ b/test/llvm_autogenerated/dead-vreg.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "foo" $foo) (func $foo (param $$0 i32) (param $$1 i32) (param $$2 i32) @@ -96,4 +98,4 @@ (return) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/f32.wast b/test/llvm_autogenerated/f32.wast index bd73709b0..bdad62714 100644 --- a/test/llvm_autogenerated/f32.wast +++ b/test/llvm_autogenerated/f32.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (type $FUNCSIG$ffff (func (param f32 f32 f32) (result f32))) (import $fmaf "env" "fmaf" (param f32 f32 f32) (result f32)) @@ -141,4 +143,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/f64.wast b/test/llvm_autogenerated/f64.wast index 0bf0b702d..2399fd22a 100644 --- a/test/llvm_autogenerated/f64.wast +++ b/test/llvm_autogenerated/f64.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (type $FUNCSIG$dddd (func (param f64 f64 f64) (result f64))) (import $fma "env" "fma" (param f64 f64 f64) (result f64)) @@ -141,4 +143,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/fast-isel.wast b/test/llvm_autogenerated/fast-isel.wast index 8c956cb7d..c1b775e2b 100644 --- a/test/llvm_autogenerated/fast-isel.wast +++ b/test/llvm_autogenerated/fast-isel.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "immediate_f32" $immediate_f32) (export "immediate_f64" $immediate_f64) @@ -14,4 +16,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/frem.wast b/test/llvm_autogenerated/frem.wast index 08890d0b9..4b15f3a14 100644 --- a/test/llvm_autogenerated/frem.wast +++ b/test/llvm_autogenerated/frem.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (type $FUNCSIG$fff (func (param f32 f32) (result f32))) (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) @@ -24,4 +26,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/func.wast b/test/llvm_autogenerated/func.wast index 5a413d1ed..a3ce0d78d 100644 --- a/test/llvm_autogenerated/func.wast +++ b/test/llvm_autogenerated/func.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "f0" $f0) (export "f1" $f1) @@ -46,4 +48,4 @@ (unreachable) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/global.wast b/test/llvm_autogenerated/global.wast index d7013750c..b744e73d3 100644 --- a/test/llvm_autogenerated/global.wast +++ b/test/llvm_autogenerated/global.wast @@ -1,5 +1,6 @@ (module (memory 1 + (segment 4 "\b0\08\00\00") (segment 8 "9\05\00\00") (segment 24 "\01\00\00\00") (segment 28 "*\00\00\00") @@ -35,4 +36,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 1195, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 2224, "initializers": [] } diff --git a/test/llvm_autogenerated/globl.wast b/test/llvm_autogenerated/globl.wast index 2c965f612..a5c3c09df 100644 --- a/test/llvm_autogenerated/globl.wast +++ b/test/llvm_autogenerated/globl.wast @@ -1,9 +1,11 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "foo" $foo) (func $foo (return) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/i32-load-store-alignment.wast b/test/llvm_autogenerated/i32-load-store-alignment.wast index 860fc2265..579c83ef1 100644 --- a/test/llvm_autogenerated/i32-load-store-alignment.wast +++ b/test/llvm_autogenerated/i32-load-store-alignment.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "ldi32_a1" $ldi32_a1) (export "ldi32_a2" $ldi32_a2) @@ -162,4 +164,4 @@ (return) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/i32.wast b/test/llvm_autogenerated/i32.wast index aa9636288..75696b8ac 100644 --- a/test/llvm_autogenerated/i32.wast +++ b/test/llvm_autogenerated/i32.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "add32" $add32) (export "sub32" $sub32) @@ -159,4 +161,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/i64-load-store-alignment.wast b/test/llvm_autogenerated/i64-load-store-alignment.wast index b98c931d5..9741e5a72 100644 --- a/test/llvm_autogenerated/i64-load-store-alignment.wast +++ b/test/llvm_autogenerated/i64-load-store-alignment.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "ldi64_a1" $ldi64_a1) (export "ldi64_a2" $ldi64_a2) @@ -242,4 +244,4 @@ (return) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/i64.wast b/test/llvm_autogenerated/i64.wast index 0190e9095..cd228e515 100644 --- a/test/llvm_autogenerated/i64.wast +++ b/test/llvm_autogenerated/i64.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "add64" $add64) (export "sub64" $sub64) @@ -159,4 +161,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/ident.wast b/test/llvm_autogenerated/ident.wast index 23a1430e0..d54e39f47 100644 --- a/test/llvm_autogenerated/ident.wast +++ b/test/llvm_autogenerated/ident.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/immediates.wast b/test/llvm_autogenerated/immediates.wast index 85e5c51cb..ad3d894cc 100644 --- a/test/llvm_autogenerated/immediates.wast +++ b/test/llvm_autogenerated/immediates.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "zero_i32" $zero_i32) (export "one_i32" $one_i32) @@ -146,4 +148,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/legalize.wast b/test/llvm_autogenerated/legalize.wast index d632e1176..1ecc46fca 100644 --- a/test/llvm_autogenerated/legalize.wast +++ b/test/llvm_autogenerated/legalize.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (type $FUNCSIG$vijjj (func (param i32 i64 i64 i64))) (import $__lshrti3 "env" "__lshrti3" (param i32 i64 i64 i64)) @@ -343,7 +345,7 @@ (local $$311 i32) (local $$312 i32) (set_local $$183 - (i32.const 1) + (i32.const 4) ) (set_local $$183 (i32.load @@ -360,7 +362,7 @@ ) ) (set_local $$184 - (i32.const 1) + (i32.const 4) ) (set_local $$312 (i32.store @@ -3864,7 +3866,7 @@ ) ) (set_local $$185 - (i32.const 1) + (i32.const 4) ) (set_local $$312 (i32.store @@ -3875,4 +3877,4 @@ (return) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/load-ext.wast b/test/llvm_autogenerated/load-ext.wast index 6853e2d8d..433d7ee50 100644 --- a/test/llvm_autogenerated/load-ext.wast +++ b/test/llvm_autogenerated/load-ext.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "sext_i8_i32" $sext_i8_i32) (export "zext_i8_i32" $zext_i8_i32) @@ -82,4 +84,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/load-store-i1.wast b/test/llvm_autogenerated/load-store-i1.wast index 003b656dd..b80466466 100644 --- a/test/llvm_autogenerated/load-store-i1.wast +++ b/test/llvm_autogenerated/load-store-i1.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "load_u_i1_i32" $load_u_i1_i32) (export "load_s_i1_i32" $load_s_i1_i32) @@ -68,4 +70,4 @@ (return) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/load.wast b/test/llvm_autogenerated/load.wast index 3bbddd8be..2495c149a 100644 --- a/test/llvm_autogenerated/load.wast +++ b/test/llvm_autogenerated/load.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "ldi32" $ldi32) (export "ldi64" $ldi64) @@ -34,4 +36,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/mem-intrinsics.wast b/test/llvm_autogenerated/mem-intrinsics.wast index f558f19ec..d5456299a 100644 --- a/test/llvm_autogenerated/mem-intrinsics.wast +++ b/test/llvm_autogenerated/mem-intrinsics.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$i (func (result i32))) @@ -73,7 +75,7 @@ (local $$3 i32) (local $$4 i32) (set_local $$0 - (i32.const 1) + (i32.const 4) ) (set_local $$0 (i32.load @@ -90,7 +92,7 @@ ) ) (set_local $$1 - (i32.const 1) + (i32.const 4) ) (set_local $$4 (i32.store @@ -127,7 +129,7 @@ ) ) (set_local $$2 - (i32.const 1) + (i32.const 4) ) (set_local $$4 (i32.store @@ -165,4 +167,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/memory-addr32.wast b/test/llvm_autogenerated/memory-addr32.wast index af7510339..1b91b8b81 100644 --- a/test/llvm_autogenerated/memory-addr32.wast +++ b/test/llvm_autogenerated/memory-addr32.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "memory_size" $memory_size) (export "grow_memory" $grow_memory) @@ -15,4 +17,4 @@ (return) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/memory-addr64.wast b/test/llvm_autogenerated/memory-addr64.wast index 85246d4cb..d6796a67c 100644 --- a/test/llvm_autogenerated/memory-addr64.wast +++ b/test/llvm_autogenerated/memory-addr64.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "memory_size" $memory_size) (export "grow_memory" $grow_memory) @@ -15,4 +17,4 @@ (return) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/non-executable-stack.wast b/test/llvm_autogenerated/non-executable-stack.wast index 23a1430e0..d54e39f47 100644 --- a/test/llvm_autogenerated/non-executable-stack.wast +++ b/test/llvm_autogenerated/non-executable-stack.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/offset-folding.wast b/test/llvm_autogenerated/offset-folding.wast index c45dccb4a..05573e4f4 100644 --- a/test/llvm_autogenerated/offset-folding.wast +++ b/test/llvm_autogenerated/offset-folding.wast @@ -1,5 +1,7 @@ (module - (memory 1) + (memory 1 + (segment 4 "\e0\04\00\00") + ) (export "memory" memory) (export "test0" $test0) (export "test1" $test1) @@ -26,4 +28,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 215, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1248, "initializers": [] } diff --git a/test/llvm_autogenerated/offset.wast b/test/llvm_autogenerated/offset.wast index 3de0a5445..455f393e4 100644 --- a/test/llvm_autogenerated/offset.wast +++ b/test/llvm_autogenerated/offset.wast @@ -1,5 +1,6 @@ (module (memory 1 + (segment 4 "\10\04\00\00") (segment 8 "\00\00\00\00") ) (export "memory" memory) @@ -349,4 +350,4 @@ (return) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 11, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/phi.wast b/test/llvm_autogenerated/phi.wast index eae083138..3b3197757 100644 --- a/test/llvm_autogenerated/phi.wast +++ b/test/llvm_autogenerated/phi.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "test0" $test0) (export "test1" $test1) @@ -64,4 +66,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/reg-stackify.wast b/test/llvm_autogenerated/reg-stackify.wast index 000aaac2c..c35651002 100644 --- a/test/llvm_autogenerated/reg-stackify.wast +++ b/test/llvm_autogenerated/reg-stackify.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (type $FUNCSIG$v (func)) (type $FUNCSIG$vi (func (param i32))) @@ -261,4 +263,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/return-int32.wast b/test/llvm_autogenerated/return-int32.wast index afe7a8260..35a0de3fa 100644 --- a/test/llvm_autogenerated/return-int32.wast +++ b/test/llvm_autogenerated/return-int32.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "return_i32" $return_i32) (func $return_i32 (param $$0 i32) (result i32) @@ -8,4 +10,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/return-void.wast b/test/llvm_autogenerated/return-void.wast index eefa8268f..bdcdbf300 100644 --- a/test/llvm_autogenerated/return-void.wast +++ b/test/llvm_autogenerated/return-void.wast @@ -1,9 +1,11 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "return_void" $return_void) (func $return_void (return) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/select.wast b/test/llvm_autogenerated/select.wast index 4720dc7e7..cfe5270a8 100644 --- a/test/llvm_autogenerated/select.wast +++ b/test/llvm_autogenerated/select.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "select_i32_bool" $select_i32_bool) (export "select_i32_eq" $select_i32_eq) @@ -122,4 +124,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/signext-zeroext.wast b/test/llvm_autogenerated/signext-zeroext.wast index 7ec9a6ec0..0e2821734 100644 --- a/test/llvm_autogenerated/signext-zeroext.wast +++ b/test/llvm_autogenerated/signext-zeroext.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "z2s_func" $z2s_func) (export "s2z_func" $s2z_func) @@ -54,4 +56,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/store-results.wast b/test/llvm_autogenerated/store-results.wast index 9b38599c1..de878f6ea 100644 --- a/test/llvm_autogenerated/store-results.wast +++ b/test/llvm_autogenerated/store-results.wast @@ -1,5 +1,7 @@ (module - (memory 1) + (memory 1 + (segment 4 " \04\00\00") + ) (export "memory" memory) (export "single_block" $single_block) (export "foo" $foo) @@ -69,7 +71,7 @@ (local $$3 i32) (local $$4 i32) (set_local $$1 - (i32.const 1) + (i32.const 4) ) (set_local $$1 (i32.load @@ -86,7 +88,7 @@ ) ) (set_local $$2 - (i32.const 1) + (i32.const 4) ) (set_local $$4 (i32.store @@ -108,7 +110,7 @@ ) ) (set_local $$3 - (i32.const 1) + (i32.const 4) ) (set_local $$4 (i32.store @@ -121,4 +123,4 @@ ) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 19, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1056, "initializers": [] } diff --git a/test/llvm_autogenerated/store-trunc.wast b/test/llvm_autogenerated/store-trunc.wast index d2dc87e51..b73119e32 100644 --- a/test/llvm_autogenerated/store-trunc.wast +++ b/test/llvm_autogenerated/store-trunc.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "trunc_i8_i32" $trunc_i8_i32) (export "trunc_i16_i32" $trunc_i16_i32) @@ -42,4 +44,4 @@ (return) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/store.wast b/test/llvm_autogenerated/store.wast index 360811ee8..70c127fef 100644 --- a/test/llvm_autogenerated/store.wast +++ b/test/llvm_autogenerated/store.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (export "sti32" $sti32) (export "sti64" $sti64) @@ -34,4 +36,4 @@ (return) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/switch.wast b/test/llvm_autogenerated/switch.wast index 72ddf9bbe..dbcb87fdc 100644 --- a/test/llvm_autogenerated/switch.wast +++ b/test/llvm_autogenerated/switch.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (type $FUNCSIG$v (func)) (import $foo0 "env" "foo0") @@ -87,4 +89,4 @@ (return) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/unreachable.wast b/test/llvm_autogenerated/unreachable.wast index c49645c44..e075972fe 100644 --- a/test/llvm_autogenerated/unreachable.wast +++ b/test/llvm_autogenerated/unreachable.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (type $FUNCSIG$v (func)) (import $abort "env" "abort") @@ -19,4 +21,4 @@ (return) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/unused-argument.wast b/test/llvm_autogenerated/unused-argument.wast index 3d86ec9db..f3f37ecbd 100644 --- a/test/llvm_autogenerated/unused-argument.wast +++ b/test/llvm_autogenerated/unused-argument.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (type $FUNCSIG$i (func (result i32))) (import $return_something "env" "return_something" (result i32)) @@ -21,4 +23,4 @@ (return) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/userstack.wast b/test/llvm_autogenerated/userstack.wast index 090e554a0..1e6427e00 100644 --- a/test/llvm_autogenerated/userstack.wast +++ b/test/llvm_autogenerated/userstack.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (type $FUNCSIG$vi (func (param i32))) (import $ext_func "env" "ext_func" (param i32)) @@ -16,7 +18,7 @@ (local $$2 i32) (local $$3 i32) (set_local $$0 - (i32.const 1) + (i32.const 4) ) (set_local $$0 (i32.load @@ -33,7 +35,7 @@ ) ) (set_local $$1 - (i32.const 1) + (i32.const 4) ) (set_local $$3 (i32.store @@ -55,7 +57,7 @@ ) ) (set_local $$2 - (i32.const 1) + (i32.const 4) ) (set_local $$3 (i32.store @@ -71,7 +73,7 @@ (local $$2 i32) (local $$3 i32) (set_local $$0 - (i32.const 1) + (i32.const 4) ) (set_local $$0 (i32.load @@ -88,7 +90,7 @@ ) ) (set_local $$1 - (i32.const 1) + (i32.const 4) ) (set_local $$3 (i32.store @@ -114,7 +116,7 @@ ) ) (set_local $$2 - (i32.const 1) + (i32.const 4) ) (set_local $$3 (i32.store @@ -131,7 +133,7 @@ (local $$3 i32) (local $$4 i32) (set_local $$0 - (i32.const 1) + (i32.const 4) ) (set_local $$0 (i32.load @@ -148,7 +150,7 @@ ) ) (set_local $$1 - (i32.const 1) + (i32.const 4) ) (set_local $$4 (i32.store @@ -185,7 +187,7 @@ ) ) (set_local $$2 - (i32.const 1) + (i32.const 4) ) (set_local $$4 (i32.store @@ -203,7 +205,7 @@ (local $$5 i32) (local $$6 i32) (set_local $$1 - (i32.const 1) + (i32.const 4) ) (set_local $$1 (i32.load @@ -220,7 +222,7 @@ ) ) (set_local $$2 - (i32.const 1) + (i32.const 4) ) (set_local $$6 (i32.store @@ -266,7 +268,7 @@ ) ) (set_local $$3 - (i32.const 1) + (i32.const 4) ) (set_local $$6 (i32.store @@ -282,7 +284,7 @@ (local $$2 i32) (local $$3 i32) (set_local $$0 - (i32.const 1) + (i32.const 4) ) (set_local $$0 (i32.load @@ -299,7 +301,7 @@ ) ) (set_local $$1 - (i32.const 1) + (i32.const 4) ) (set_local $$3 (i32.store @@ -324,7 +326,7 @@ ) ) (set_local $$2 - (i32.const 1) + (i32.const 4) ) (set_local $$3 (i32.store @@ -340,7 +342,7 @@ (local $$3 i32) (local $$4 i32) (set_local $$1 - (i32.const 1) + (i32.const 4) ) (set_local $$3 (i32.load @@ -373,7 +375,7 @@ (i32.const 0) ) (set_local $$2 - (i32.const 1) + (i32.const 4) ) (set_local $$3 (i32.store @@ -390,7 +392,7 @@ (local $$4 i32) (local $$5 i32) (set_local $$1 - (i32.const 1) + (i32.const 4) ) (set_local $$1 (i32.load @@ -410,7 +412,7 @@ (get_local $$4) ) (set_local $$2 - (i32.const 1) + (i32.const 4) ) (set_local $$4 (i32.store @@ -450,7 +452,7 @@ ) ) (set_local $$3 - (i32.const 1) + (i32.const 4) ) (set_local $$4 (i32.store @@ -461,4 +463,4 @@ (return) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/llvm_autogenerated/varargs.wast b/test/llvm_autogenerated/varargs.wast index 941c9883d..8757285a2 100644 --- a/test/llvm_autogenerated/varargs.wast +++ b/test/llvm_autogenerated/varargs.wast @@ -1,5 +1,7 @@ (module - (memory 0) + (memory 1 + (segment 4 "\10\04\00\00") + ) (export "memory" memory) (type $FUNCSIG$v (func)) (import $callee "env" "callee") @@ -131,7 +133,7 @@ (local $$7 i32) (local $$8 i32) (set_local $$5 - (i32.const 1) + (i32.const 4) ) (set_local $$5 (i32.load @@ -148,7 +150,7 @@ ) ) (set_local $$6 - (i32.const 1) + (i32.const 4) ) (set_local $$8 (i32.store @@ -157,7 +159,7 @@ ) ) (set_local $$1 - (i32.const 1) + (i32.const 4) ) (set_local $$1 (i32.load @@ -174,7 +176,7 @@ ) ) (set_local $$2 - (i32.const 1) + (i32.const 4) ) (set_local $$8 (i32.store @@ -198,7 +200,7 @@ ) (call_import $callee) (set_local $$3 - (i32.const 1) + (i32.const 4) ) (set_local $$3 (i32.load @@ -215,7 +217,7 @@ ) ) (set_local $$4 - (i32.const 1) + (i32.const 4) ) (set_local $$8 (i32.store @@ -233,7 +235,7 @@ ) ) (set_local $$7 - (i32.const 1) + (i32.const 4) ) (set_local $$8 (i32.store @@ -244,4 +246,4 @@ (return) ) ) -;; METADATA: { "asmConsts": {},"staticBump": 4, "initializers": [] } +;; METADATA: { "asmConsts": {},"staticBump": 1040, "initializers": [] } diff --git a/test/spec b/test/spec -Subproject 37ed2b91cf0462144362fe0c6f3a2294977b3c2 +Subproject d3dff78351018787103c8ae80f9b85a4c3fd18f diff --git a/test/waterfall b/test/waterfall -Subproject c2b3e701d0ef96b00ab8b51f6ed62f26063e81a +Subproject a3a0772cf65d01675519311166c0938dbf57566 |