The LLVM intrinsic doesn't support float64x1_t, but the required
instruction is a scalar form (e.g. `frint32x <Dd>, <Dn>`), so we can
implement these using the scalar intrinsic.
Note that Clang does not support these intrinsics, so they aren't
covered by intrinsic-test. Additional validation is included in this
patch to ensure that we're selecting an instruction with the same
behaviour as the corresponding vector form (which all have
intrinsic-tests).
In almost all cases it is preferable to use the stable `asm!` instead of
calling these intrinsics.
This PR removes the following unstable intrinsics:
- `__breakpoint` Clang extension, not part of ACLE.
- `brk`: undocumented
- `_rev*`, `_clz*`, `_rbit*`: use methods on integer types instead
- `__ldrex`, `__strex`: deprecated in ACLE, hard to use correctly
- Register access API: API doesn't match ACLE, better to just use asm
Also considered for deletion, but not included in this PR:
- Barriers: `__isb`, `__dsb`, `__dmb`
- Hints: `__wfi`, `__wfe`, `__sev`, `__sevl`, `__yield`, `__nop`
These intrinsics actually are zeroing, so we should be upfront
that these still return a valid value in reality. At most,
we might in the future want to use a "freezing" semantics here.
In any case, they are definitely not returning MaybeUninit,
or any other possibly-poison value.
This is a follow-up to #1345 where these appeared as unstable in the
standard library docs because they are only stabilized for ARM. They
were missed in the original PR.
- Fix a typo in the feature name
- Update docs to reflect changes in behavior on invalid ordering in
stabilized PR: invalid ordering is no longer UB, just causes panic as
well as compare_exchange
This commit adds intrinsics to the `wasm32` to support the [relaxed SIMD
proposal][proposal]. These are added with the same naming conventions of
existing simd-related intrinsics for wasm which is similar to the
instruction name but matches sign in a few places.
This additionally updates Wasmtime to execute tests with support for the
relaxed simd proposal. No release has been made yet so this uses the
`dev` release, and I can make a PR in April when the support in Wasmtime
has been released to an official release. The `wasmprinter` crate is
also updated to understand these instruction opcodes as well.
Documentation has been added for all intrinsics, but tests have only
been added for some of them so far. I hope to follow-up later with more
tests.
[proposal]: https://github.com/WebAssembly/relaxed-simd