* Add vroundps, vceilps, vfloorps, vsqrtps, vsqrtpd
* Uninhibit assert_instr on non-expanded intrinsics
Also use the new simd_test macro
* Use simd_test where possible
* Add automated tests for vround*
* Add target_feature guards to automated tests
* Move automated tests below their functions
This commit switches the remaining "wrapper" tests to assert_instr with
constant parameters. This form of test is necessary when a vendor
intrinsic requires an immediate constant value to optimize properly into
the intended CPU instruction.
Some intrinsics need to be invoked with constant arguments to get the right
instruction to get generated, so this commit enhances the `assert_instr` macro
to enable this ability. Namely you pass constant arguments like:
#[assert_instr(foo, a = b)]
where this will assert that the intrinsic, when invoked with argument `a` equal
to the value `b` and all other arguments passed from the outside, will generate
the instruction `foo`.
Closes#49
This commit alters the test suite to unconditionally compile and run all tests,
regardless of the ambient target features enabled. This then uses a new
convenience macro, `#[simd_test]`, to guard all tests with the appropriate
`cfg_feature_enabled!` and also enable the `#[target_feature]` appropriately.
There's a lot of trickery in this crate which expands to a lot of code, so in
addition to asserting that we find the right instruction, let's assert we find
a small function as well (as these should all be just one or so instructions
anyway).
This commit adds CI for a few more targets:
* i686-unknown-linux-gnu
* arm-unknown-linux-gnueabihf
* armv7-unknown-linux-gnueabihf
* aarch64-unknown-linux-gnu
The CI here is structured around using a Docker container to set up a test
environment and then QEMU is used to actually execute code from these platforms.
QEMU's emulation actually makes it so we can continue to just use `cargo test`,
as processes can be spawned from QEMU like `objdump` and files can be read (for
libbacktrace). Ends up being a relatively seamless experience!
Note that a number of intrinsics were disabled on i686 because they were failing
tests, and otherwise a few ARM touch-ups were made to get tests passing.