Skip to content

Don't use SSE4.1 instructions unless the target supports it #263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "euclid"
version = "0.16.2"
version = "0.16.3"
authors = ["The Servo Project Developers"]
description = "Geometry primitives"
documentation = "https://docs.rs/euclid/"
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![cfg_attr(feature = "unstable", feature(asm, repr_simd, test, fn_must_use))]
#![cfg_attr(feature = "unstable", feature(asm, cfg_target_feature, repr_simd, test, fn_must_use))]

//! A collection of strongly typed math tools for computer graphics with an inclination
//! towards 2d graphics and layout.
Expand Down
4 changes: 2 additions & 2 deletions src/side_offsets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,13 @@ impl SideOffsets2DSimdI32 {
}
}

#[cfg(not(target_arch = "x86_64"))]
#[cfg(not(target_feature = "sse4.1"))]
#[inline]
pub fn is_zero(&self) -> bool {
self.top == 0 && self.right == 0 && self.bottom == 0 && self.left == 0
}

#[cfg(target_arch = "x86_64")]
#[cfg(target_feature = "sse4.1")]
#[inline]
pub fn is_zero(&self) -> bool {
let is_zero: bool;
Expand Down