Skip to content

Commit ec9148a

Browse files
author
bors-servo
authored
Auto merge of #263 - nical:sse4, r=SimonSapin
Don't use SSE4.1 instructions unless the target supports it This is a rebase of #140. Fixes #140, fixes #48. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/euclid/263) <!-- Reviewable:end -->
2 parents 294e297 + 437bb8c commit ec9148a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "euclid"
3-
version = "0.16.2"
3+
version = "0.16.3"
44
authors = ["The Servo Project Developers"]
55
description = "Geometry primitives"
66
documentation = "https://docs.rs/euclid/"

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// option. This file may not be copied, modified, or distributed
88
// except according to those terms.
99

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

1212
//! A collection of strongly typed math tools for computer graphics with an inclination
1313
//! towards 2d graphics and layout.

src/side_offsets.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,13 @@ impl SideOffsets2DSimdI32 {
202202
}
203203
}
204204

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

211-
#[cfg(target_arch = "x86_64")]
211+
#[cfg(target_feature = "sse4.1")]
212212
#[inline]
213213
pub fn is_zero(&self) -> bool {
214214
let is_zero: bool;

0 commit comments

Comments
 (0)