The existing implementations worked on x86-64 when instructions were emitted, but relied on UB per the LLVM IR. Add a test which checks the behaviour when the inputs are constants, so that the LLVM IR constant folder can see and exploit the UB.
Remove spectest ignores for reference types tests on llvm.
Extend llvm ABIs to pass externref and funcref.
Expose all libcalls through the Libcalls enum.
Add support for all libcalls to llvm object_file.rs, even libcalls that we aren't using.
Add missing no_mangle to libcalls.
Change 'memory' to 'memory32' in libcalls in preparation for the memory64 proposal.
Remove 'local' from 'wasmer_local_memory_copy' in libcalls to fit naming convention.
Add mangling of externref and funcref for llvm-debug-dir.
Mark 'wasmer_func_ref' readonly.
1781: Cranelift upgrade r=syrusakbary a=syrusakbary
<!--
Prior to submitting a PR, review the CONTRIBUTING.md document for recommendations on how to test:
https://github.com/wasmerio/wasmer/blob/master/CONTRIBUTING.md#pull-requests
-->
# Description
Upgrade Cranelift to `0.67`. This upgrade also enables all SIMD tests (with one small exception operator that is still not fixed in Cranelift).
<!--
Provide details regarding the change including motivation,
links to related issues, and the context of the PR.
-->
Co-authored-by: Syrus <me@syrusakbary.com>
Co-authored-by: Syrus Akbary <me@syrusakbary.com>
A new Arm64Linux ABI is added but it's an unedited copy of the X86_64SystemV one so far.
A bunch of cleanups from clippy. Use matches! more, don't pass &Box<dyn Abi>.
Use a load instruction before the store to ensure that all the memory is addressable. The loaded value is discarded.
NB. We don't apply this to atomics. It's not clear whether atomic stores can be half-committed.
Fixes align.wast and memory_trap.wast on aarch64.
Dynamic memory has the same struct as static memory, in particular the length field is not a pointer to a length field.
Also, send the correct trap code.