Skip to content

Commit b8f8946

Browse files
authored
Merge branch 'master' into runtime_detection
2 parents 9f3c333 + a5e7383 commit b8f8946

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+828
-909
lines changed

.appveyor.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
environment:
2+
matrix:
3+
- TARGET: x86_64-pc-windows-msvc
4+
5+
install:
6+
# Install rust, x86_64-pc-windows-msvc host
7+
- appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
8+
- rustup-init.exe -y --default-host x86_64-pc-windows-msvc --default-toolchain nightly
9+
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
10+
- if NOT "%TARGET%" == "x86_64-pc-windows-msvc" rustup target add %TARGET%
11+
- rustc -vV
12+
- cargo -vV
13+
14+
build: false
15+
16+
test_script:
17+
- cargo test --target %TARGET%
18+
- cargo test --target %TARGET% --release

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
language: rust
2+
sudo: false
3+
4+
matrix:
5+
include:
6+
- rust: nightly
7+
- rust: nightly
8+
os: osx
9+
10+
script:
11+
- cargo test
12+
- cargo test --release
13+
14+
notifications:
15+
email:
16+
on_success: never

.vscode/temp.sql

Whitespace-only changes.

CONTRIBUTING.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ example for `_mm_adds_epi16`:
1414
/// Add packed 16-bit integers in `a` and `b` using saturation.
1515
#[inline(always)]
1616
#[target_feature = "+sse2"]
17+
#[cfg_attr(test, assert_instr(paddsw))]
1718
pub fn _mm_adds_epi16(a: i16x8, b: i16x8) -> i16x8 {
1819
unsafe { paddsw(a, b) }
1920
}
@@ -32,6 +33,10 @@ Let's break this down:
3233
support `sse2`, the compiler will still generate code for `_mm_adds_epi16`
3334
*as if* `sse2` support existed. Without this attribute, the compiler might
3435
not generate the intended CPU instruction.
36+
* The `#[cfg_attr(test, assert_instr(paddsw))]` attribute indicates that when
37+
we're testing the crate we'll assert that the `paddsw` instruction is
38+
generated inside this function, ensuring that the SIMD intrinsic truly is an
39+
intrinsic for the instruction!
3540
* The types of the vectors given to the intrinsic should generally match the
3641
types as provided in the vendor interface. We'll talk about this more below.
3742
* The implementation of the vendor intrinsic is generally very simple.
@@ -40,7 +45,7 @@ Let's break this down:
4045
compiler intrinsic (in this case, `paddsw`) when one is available. More on
4146
this below as well.
4247

43-
Once a function has been added, you should add at least one test for basic
48+
Once a function has been added, you should also add at least one test for basic
4449
functionality. Here's an example for `_mm_adds_epi16`:
4550

4651
```rust

Cargo.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,11 @@ license = "MIT"
1212

1313
[profile.release]
1414
debug = true
15-
opt-level = 3
15+
opt-level = 3
16+
17+
[profile.bench]
18+
debug = 1
19+
opt-level = 3
20+
21+
[dev-dependencies]
22+
assert-instr = { path = "assert-instr" }

TODO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ sse
155155
* [ ] `_mm_storer_ps`
156156
* [ ] `_mm_move_ss`
157157
* [ ] `_mm_shuffle_ps`
158-
* [ ] `_mm_unpackhi_ps`
158+
* [x] `_mm_unpackhi_ps`
159159
* [ ] `_mm_unpacklo_ps`
160160
* [ ] `_mm_movehl_ps`
161161
* [ ] `_mm_movelh_ps`

asm/x86_bmi2_bzhi.asm

Lines changed: 0 additions & 12 deletions
This file was deleted.

asm/x86_bmi2_bzhi.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.

asm/x86_bmi2_mulx.asm

Lines changed: 0 additions & 17 deletions
This file was deleted.

asm/x86_bmi2_mulx.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.

asm/x86_bmi2_pdep.asm

Lines changed: 0 additions & 12 deletions
This file was deleted.

asm/x86_bmi2_pdep.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.

asm/x86_bmi2_pext.asm

Lines changed: 0 additions & 12 deletions
This file was deleted.

asm/x86_bmi2_pext.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.

asm/x86_bmi_andn.asm

Lines changed: 0 additions & 12 deletions
This file was deleted.

asm/x86_bmi_andn.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.

asm/x86_bmi_bextr.asm

Lines changed: 0 additions & 32 deletions
This file was deleted.

asm/x86_bmi_bextr.rs

Lines changed: 0 additions & 21 deletions
This file was deleted.

asm/x86_bmi_blsi.asm

Lines changed: 0 additions & 12 deletions
This file was deleted.

asm/x86_bmi_blsi.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.

asm/x86_bmi_blsr.asm

Lines changed: 0 additions & 12 deletions
This file was deleted.

asm/x86_bmi_blsr.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.

asm/x86_bmi_tzcnt.asm

Lines changed: 0 additions & 12 deletions
This file was deleted.

asm/x86_bmi_tzcnt.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.

asm/x86_lzcnt_lzcnt.asm

Lines changed: 0 additions & 12 deletions
This file was deleted.

asm/x86_lzcnt_lzcnt.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.

asm/x86_popcnt_popcnt.asm

Lines changed: 0 additions & 12 deletions
This file was deleted.

asm/x86_popcnt_popcnt.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)