| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
After s2wasm was removed, these tests don't seem to be used anymore.
|
|
|
|
|
|
| |
Automated renaming according to
https://github.com/WebAssembly/spec/issues/884#issuecomment-426433329.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Emit invokeFuncs list as metadata
* Refactor s2wasm to use ModuleWriter
* Fix wasm-emscripten-finalize metadata output for binary output
* Add a flag to emit binary from s2wasm
NOTE: I chose to emit text by default, and binary behind a flag. This
mismatches with asm2wasm (and the expectations of users of a "2wasm"
tool), but doesn't break any existing users of s2wasm. If s2wasm is
deprecated in favor of lld, this will be the least disruptive change,
and we won't have to live with awkward defaults for too long.
* Emit source maps in the binary output of s2wasm
* Only emit binary with an outfile specified
|
|
|
|
|
|
|
|
|
| |
* Extract comma-handling logic into a lambda function
* Start emitting all metadata from binaryen - handle declares and externs
* Add implementedFunctions and exports metadata
* Remove EM_ASM calls from declares
|
|
|
|
| |
It was returning the top of the allocated space rather than the bottom.
Fix taken from @tbfleming in kripken/emscripten#5974
|
| |
|
| |
|
|
|
|
|
|
| |
* Runtime.stackAlloc should grow down for wasm
* stackAlloc should align properly; update tests
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Generate stackSave function in s2wasm
* Generate stackAlloc in s2wasm
* Generate stackRestore in s2wasm
* Update dot_s tests for runtime functions
* Add s2wasm check for exporting runtime functions
* Fix flake8 for s2wasm.py
* Rename wasmBuilder to builder
|
|
|
|
| |
unruly (#928)
|
|
|
|
|
| |
The emscripten JS module code creates the memory using the native wasm
APIs, and imports that into the wasm module.
|
|
|
|
|
|
|
|
| |
In wast files, the spec and WABT require imports to appear before any
non-import definitions (see also
https://github.com/WebAssembly/wabt/issues/152). This patch re-orders
visitModule in the wast printer to meet this requirement, and more or
less match the order of the binary sections. Also remove extraneous
whitespace around table definitions.
|
|
|
|
|
|
|
| |
Previously a table was only created if there were any address-taken
functions. New module validation rules require the existence of
a table for any call-indirects to validate (even if they are dead and
never called). However this use case seems common enough that we might
want to make it continue to work. So the linker now always creates an empty table segment (indicating an empty table).
|
|
|
|
|
| |
Otherwise when we export it as "$0" it's an undefined name.
The spec interpreter actually rejects this, although I think it's
intended to work, given the tests in export.wast. wabt also accepts it.
|
|
|
|
|
|
|
|
|
|
|
| |
Several updates for s2wasm and its tests:
Add explicit drops where they are emitted by LLVM already
Convert loops (which are still modeled in the old way by LLVM) to wrap them in an explicit block (for the exit label). This also allows simplifying the loop creation (no need to post-process the implicit block which is the loop's body). After the engines update to 0xc we should update LLVM to model loops in the 0xc way, but for now it remains compatible with 0xb and 0xc.
Fix the order of the calls to setTee() when creating tee_locals
Add an explicit drop when creating the _start entry function wrapper if needed
Update dot_s and llvm_autogenerated tests to remove store-results optimization (and few other minor updates)
Fix the test auto-updater to fail if subprocesses fail
There still seems to be a validation failure when building libc (I think it's from the stricter drop rules, but it may be in the source rather than the compiler), but this at least makes Binaryen's tests pa
|
| |
|
|
|
|
|
|
|
|
|
| |
* Avoid double dollarsigns in s2wasm local names.
Recognize '$' as part of the .s syntax for register names, and exclude it
when forming the wasm local name. This changes names like "$$0" to "$0".
* Fix a comment.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
LLVM emits static initializers in the ELF style, by placing pointers to
the constructor functions in a .init_array section. Handle this in
s2wasm for now by converting these to standard emscripten metadata.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
Use the llvm_autogenerated tests instead.
|