Commit Graph

2629 Commits

Author SHA1 Message Date
Vincent Barrielle
44d1343cb0 avx: add _mm256_div_pd, _mm256_div_ps 2017-09-29 11:53:02 -04:00
André Oliveira
d23da170d5 Match clang's code unsigned implementation for consistency 2017-09-29 11:42:27 -04:00
André Oliveira
6a081164bb Reorder imports 2017-09-29 11:42:27 -04:00
André Oliveira
790087c0fb Fix 'assert_*' tests by using the single precision instruction 2017-09-29 11:42:27 -04:00
André Oliveira
f2cbe79265 Remove define_from! hack and use mem::transmute directly 2017-09-29 11:42:27 -04:00
André Oliveira
9ad5c4e88a avx: add vandpd, vandps, vorps and vorpd
- HACK Warning: Add from impls for u64x4 <-> f64x4 and f32x8  <-> u32x8
- The 'assert_*' tests for the '*pd' instructions are failing due to llvm always using the single precision ('*ps') variation
2017-09-29 11:42:27 -04:00
Dustin Bensing
e6f343d989 added support for _mm_cvtpd_epi32 / cvtpd2dq 2017-09-28 19:44:32 -04:00
gwenn
d8881bcbc9 ssse3 (#68)
* SSSE3: _mm_abs_epi16, _mm_abs_epi32, _mm_hadd_epi16

* SSSE3: _mm_hadds_epi16

* SSSE3: assert_instr

* SSSE3: _mm_hadd_epi32

* SSSE3: _mm_hsub_epi16

* SSSE3: _mm_hsubs_epi16

* SSSE3: _mm_hsub_epi32

* SSSE3: _mm_maddubs_epi16

* SSSE3: _mm_mulhrs_epi16

* SSSE3: _mm_sign_epi8

* SSSE3: _mm_sign_epi32

* SSSE3: _mm_sign_epi32

* SSSE3: Fix assert_instr
2017-09-28 14:10:40 -05:00
krampenschiesser
0511ecbaf0 added support for _mm_cvtpd_ps / cvtpd2ps 2017-09-28 12:33:05 -05:00
p32blo
3dba6f3b4d avx: add vmaxpd, vmaxps, vminpd, vminps 2017-09-28 11:03:25 -05:00
Dan Robertson
fc65913f2f [x86] Add _mm_cvtps_epi32 (cvtps2dq) function
_mm_cvtepi32_ps has been implemented, but _mm_cvtps_epi32 is missing.
Use the implementation of _mm_cvtepi32_ps as a guide for implementing
_mm_cvtps_epi32.
2017-09-28 08:41:11 -04:00
gnzlbg
7e0655e92f [arm] fix unused unsafe warning 2017-09-28 07:07:34 -04:00
gnzlbg
ffc69c752e [arm] fix aarch64 cls intrinsic 2017-09-28 06:59:53 -04:00
Alex Crichton
e0176b278f Mark arm intrinsics as unsafe 2017-09-27 21:41:51 -07:00
Alex Crichton
7063458f30 Touch up some recently added intrinsics
* Mark them as `unsafe`
* Mark the tests as `unsafe`
* Leverage the new features of the `#[assert_instr]` macro
2017-09-27 19:44:14 -07:00
Adam Niederer
ddf4512561 Add vroundps, vceilps, vfloorps, vsqrtps, vsqrtpd (#53)
* 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
2017-09-27 21:41:37 -05:00
Andrew Gallant
bd75f7fcac avx2: add _mm256_movemask_epi8 2017-09-27 12:18:57 -04:00
Andrew Gallant
5cc85000a7 x86: remove remaining wrapper tests
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.
2017-09-27 11:03:10 -05:00
Alex Crichton
24f08cd458 Enhance #[assert_instr] with constant arguments
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
2017-09-27 10:32:13 -05:00
Andrew Gallant
25cef3696a crate: use unsafe in tests 2017-09-27 11:04:23 -04:00
Andrew Gallant
6dfc65289c x86: add unsafe to all x86 vendor intrinsics
Also, add missing assert_instr tests to each intrinsic, where possible.
2017-09-27 11:04:23 -04:00
Andrew Gallant
ff9e960628 arm: add unsafe to target fns
This commit only updates one function, _rbit_u32, which conditionally
sets the target feature.
2017-09-27 11:04:23 -04:00
Andrew Gallant
84331e7afb ci: limit CI to master
This prevents duplicating CI on every PR.
2017-09-27 11:04:23 -04:00
Andrew Gallant
91d463b3e1 crate: allow unused features
It looks like const_atomic_usize_new is conditionally used?
2017-09-27 11:04:23 -04:00
Alex Crichton
89719a802d Merge pull request #56 from AdamNiederer/autotest-avx
Add assert_instr to the rest of avx.rs
2017-09-26 22:10:41 -05:00
Alex Crichton
fbcf876ce0 Merge pull request #55 from AdamNiederer/addps
Add vaddsubps
2017-09-26 22:10:21 -05:00
Alex Crichton
b5c5d82941 Merge pull request #54 from AdamNiederer/vmul
Add vmulpd and vmulps
2017-09-26 22:10:03 -05:00
Alex Crichton
9413ec01a7 Don't backtrace failures on windows 2017-09-26 20:03:01 -07:00
Adam
6486b65308 Add assert_instr to the rest of avx.rs 2017-09-26 22:57:32 -04:00
Adam
d3b97d0566 Add vaddsubps 2017-09-26 22:56:10 -04:00
Adam
ecfad658fc Add vmulpd and vmulps 2017-09-26 22:55:18 -04:00
Alex Crichton
87afb940eb Fix a test on Windows 2017-09-26 19:14:25 -07:00
Alex Crichton
c201942094 Tweak some test asserts and style 2017-09-26 19:06:44 -07:00
Adam
a01fd615ba Use new assert_instr 2017-09-26 21:19:02 -04:00
Adam Niederer
d5ed881685 Merge branch 'master' into master 2017-09-26 19:37:59 -04:00
Adam
e1dd2ae43c Constify vroundpd, add tests for vsubps and vsubpd
Tests are still up in the air because of #49.
2017-09-26 19:36:38 -04:00
Alex Crichton
60fbf44231 Run bmi tests everywhere 2017-09-26 15:55:36 -07:00
Alex Crichton
1d6fbebf11 x86 intrinsics TODO is now in an issue 2017-09-26 15:08:40 -07:00
Alex Crichton
15530322e6 Merge branch 'master' of https://github.com/mohanrajendran/stdsimd 2017-09-26 15:06:44 -07:00
Alex Crichton
6fbab9af44 Add a test for x86 runtime support
Make sure we agree with the `cupid` crate
2017-09-26 14:58:41 -07:00
Alex Crichton
2660ba176e Fix a merge conflict 2017-09-26 14:53:20 -07:00
Alex Crichton
129f7191dd Merge pull request #44 from alexcrichton/assert
Add AVX2 instruction assertiosn
2017-09-26 16:49:51 -05:00
Alex Crichton
b8bcdd93c6 Always test intrinsics unconditionally
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.
2017-09-26 14:38:58 -07:00
Alex Crichton
1fa49dfe5d Add AVX2 instruction assertiosn
Also a few other assorted modules
2017-09-26 11:12:16 -07:00
Adam
6003dbf51f Do not use nonexistent subtraction intrinsics
We can use the generic operators instead
2017-09-26 00:47:55 -04:00
Adam
ef97a06670 Add subtraction, rounding avx instrs
Adds subpd256, subps256, roundpd256, ceilpd256, floorpd256, and associated tests
2017-09-26 00:17:35 -04:00
Mohan Rajendran
b787226061 Squashing 2017-09-25 22:36:28 -05:00
Alex Crichton
299b2f3c29 Merge pull request #41 from alexcrichton/assert-small
Assert that diassembly is "small"
2017-09-25 16:10:36 -05:00
Alex Crichton
e5a98843b4 Assert that diassembly is "small"
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).
2017-09-25 13:55:48 -07:00
Alex Crichton
58119db1a0 Fix link in README 2017-09-25 13:45:00 -07:00