Skip to content

Commit 12936e9

Browse files
committed
Try "vectorcall" calling convention
1 parent 9c47380 commit 12936e9

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,10 @@
111111
112112
#![allow(dead_code)]
113113
#![allow(unused_features)]
114+
114115
#![feature(
115116
const_fn, link_llvm_intrinsics, platform_intrinsics, repr_simd, simd_ffi,
116-
target_feature, cfg_target_feature, i128_type, asm, const_atomic_usize_new
117+
target_feature, cfg_target_feature, i128_type, asm, const_atomic_usize_new, abi_vectorcall
117118
)]
118119
#![cfg_attr(test, feature(proc_macro, test))]
119120

src/x86/sse41.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pub unsafe fn _mm_blend_ps(a: f32x4, b: f32x4, imm4: u8) -> f32x4 {
6565
#[inline(always)]
6666
#[target_feature = "+sse4.1"]
6767
#[cfg_attr(test, assert_instr(extractps, imm2=0))]
68-
pub unsafe fn _mm_extract_ps(a: f32x4, imm2: u8) -> i32 {
68+
pub unsafe extern "vectorcall" fn _mm_extract_ps(a: f32x4, imm2: u8) -> i32 {
6969
macro_rules! call {
7070
($imm2:expr) => { mem::transmute(a.extract($imm2)) }
7171
}
@@ -76,7 +76,7 @@ pub unsafe fn _mm_extract_ps(a: f32x4, imm2: u8) -> i32 {
7676
#[inline(always)]
7777
#[target_feature = "+sse4.1"]
7878
#[cfg_attr(test, assert_instr(pextrb, imm4=0))]
79-
pub unsafe fn _mm_extract_epi8(a: i8x16, imm4: u8) -> i8 {
79+
pub unsafe extern "vectorcall" fn _mm_extract_epi8(a: i8x16, imm4: u8) -> i8 {
8080
macro_rules! call {
8181
($imm4:expr) => { a.extract($imm4) }
8282
}
@@ -87,7 +87,7 @@ pub unsafe fn _mm_extract_epi8(a: i8x16, imm4: u8) -> i8 {
8787
#[inline(always)]
8888
#[target_feature = "+sse4.1"]
8989
#[cfg_attr(test, assert_instr(pextrd, imm2=1))]
90-
pub unsafe fn _mm_extract_epi32(a: i32x4, imm2: u8) -> i32 {
90+
pub unsafe extern "vectorcall" fn _mm_extract_epi32(a: i32x4, imm2: u8) -> i32 {
9191
macro_rules! call {
9292
($imm2:expr) => { a.extract($imm2) }
9393
}
@@ -99,7 +99,7 @@ pub unsafe fn _mm_extract_epi32(a: i32x4, imm2: u8) -> i32 {
9999
#[inline(always)]
100100
#[target_feature = "+sse4.1"]
101101
#[cfg_attr(test, assert_instr(pextrq, imm1=1))]
102-
pub unsafe fn _mm_extract_epi64(a: i64x2, imm1: u8) -> i64 {
102+
pub unsafe extern "vectorcall" fn _mm_extract_epi64(a: i64x2, imm1: u8) -> i64 {
103103
macro_rules! call {
104104
($imm1:expr) => { a.extract($imm1) }
105105
}

0 commit comments

Comments
 (0)