| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
per-memory (#2507)
The PR updates the bulk memory operations (memory.fill, memory.copy,
table.fill, etc.) to support 64-bit addresses and counts. Previously these functions
only took u32's, even with memory64 enabled. (#2506)
This PR also allows "software-bounds-checked" memories and "guard-page-checked"
memories to coexist in the same module. It creates two versions of every memory
operation: an unrestricted version (that works with any memory) and a _default32
version (for memories with default page size and i32 indexing). (#2507)
#2506 and #2507 have been squashed together to avoid a performance regression.
This is a stepping stone to supporting custom-page-sizes (which will need to be
software-bounds-checked) (#2508).
|
|
|
|
| |
This pull request implements EHv4. Binary is mostly untested until
interp is working.
|
|
|
|
| |
This adds support in the binary/text parsers and writers,
the validator and interpreter, and objdump (but not wasm2c).
|
|
|
| |
(`TokenType::Exn` already exists for some reason)
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
The main change here is because `comments.wast` was updated to include
a "quoted" module at the top level.
Previously quoted modules had only been used as part of invalid or
malformed assertion expressions.
|
|
|
|
|
|
| |
This file is auto-generated but I had manually edited it #2091.
Instead, disabled the clang fallthrough warnings when including this
file.
|
| |
|
| |
|
|
|
|
| |
Thanks to MEM_ADDR we don't need to think about big-endian vs
little-endian for any scalar(!) operations.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This continues the work from #1783 and reduces special handling of elem
exprs, by treating them the same as other const expressions (init
expressions).
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Co-authored-by: Shravan Narayan <shravanrn@gmail.com>
|
| |
|
|
|
| |
per http://man.openbsd.org/alloca.3
|
| |
|
| |
|
| |
|
|
|
|
| |
ensure these are up to date
|
| |
|
|
|
|
|
|
|
|
| |
This adds support for the new opcodes from the Relaxed SIMD proposal
(https://github.com/WebAssembly/relaxed-simd) behind the
"--enable-relaxed-simd" flag.
The exception is the f32x4.relaxed_dot_bf16x8_add_f32x4 instruction
which is not yet implemented.
|
|
|
| |
Store templated wasm2c code as .h/.c; build templates on demand
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The module prefix is no longer optional and is now set by default to the
name of the module as given in the name section, or taken from the name
of the input file.
A new `-n/--module-name` command line flag can also be used to override.
The prefix used by the generated code is now fixed at wasm2c time which
makes the output code easier to read and also avoid the symbol pasting
in the C pre-processor which makes the source hard to understand. For
example, it makes symbols hard to `grep` for.
|
| |
|
|
|
|
|
|
| |
On MacOS, merge OOB and exhaustion traps. (Linux distinguishes these as SEGV_ACCERR vs. SEGV_MAPERR in the
si_code, but MacOS seems to deliver a SEGV_ACCERR for both.)
Add wasm_rt_init() and wasm_rt_free() functions to wasm-rt.h that the embedder must call to set up and clean up the runtime state. (If the embedder doesn't call these, OOB and exhaustion will result in an uncaught segfault.)
|
|
|
|
|
|
|
| |
All tests are now passing with cl.exe under x64. With x86 there are some test failure that I believe relate
the use of the x87 registers to pass floating point numbers. I suggest we look into fixing those as a followup.
Split out from #1833
|
|
|
|
|
| |
Use stricter compiler settings and fix the resulting warnings.
This is precursor to landing windows compiler support for wasm2c.
See #1843.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The bulk-memory proposal changed OOB access (when loading an active
data segment) from a validation failure to an initialization-time trap,
but wasm2c wasn't checking OOB access in LOAD_DATA().
When WASM_RT_MEMCHECK_SIGNAL_HANDLER is unset, this could produce memory
corruption. When WASM_RT_MEMCHECK_SIGNAL_HANDLER is set, this led to
failure in the new "data" tests that verify that modules with zero-length
active data segments are uninstantiable if offset > mem.size.
Add an unconditional bounds-check and restore the `test/wasm2c/spec/data.txt`
test (one of the failing tests tracked at #1737).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This finishes #985. This
- replaces the old names in the tests with the new names
- drops support for the deprecated names
- renames test files to match new instruction names
I don't think dropping support for the old names will be a problem at
this point. #985 says the old names are supported for convenience but we
should remove those too at some point; that "some point" may have well
arrived given that three years have passed.
The lists of names updated are in #933, #1564, WebAssembly/spec#720.
|
|
|
|
|
|
|
|
| |
This PR imports the spec tests from the Wasm testsuite repo and adds infrastructure to run them correctly.
* Adds test expectations for exception handling proposal spec tests.
* Adds missing tag signature matching code for import tests.
* Adds support for the `assert_exception` command used in new tests.
* Fix filename normalization for the spec test runner.
|
|
|
|
| |
blocks. (#1695)
|
|
|
|
|
|
|
|
|
|
| |
This adds clang-format check to the CI. This only checks the diff so it
doesn't affect the other parts of the codebase. Also generated files in
src/prebuilt/ directories are excluded from the check. A new
src/prebuilt/.clang-format is added to disable the check in the
directory.
scripts/clang-format-diff.sh is copied from the same file we are using in
Binaryen.
|
|
|
|
| |
supported call_ref (#1691)
|
| |
|
|
|
| |
`unwind` was removed. See WebAssembly/exception-handling#156.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We recently decided to change 'event' to 'tag', and 'event section' to
'tag section', out of the rationale that the section contains a
generalized tag that references a type, which may be used for something
other than exceptions, and the name 'event' can be confusing in the web
context.
See
- https://github.com/WebAssembly/exception-handling/issues/159#issuecomment-857910130
- https://github.com/WebAssembly/exception-handling/pull/161
|