diff --git a/gfx/qcms/src/transform_avx.rs b/gfx/qcms/src/transform_avx.rs index 5bcabcc0aa0e..c7f982a3f707 100644 --- a/gfx/qcms/src/transform_avx.rs +++ b/gfx/qcms/src/transform_avx.rs @@ -20,6 +20,7 @@ pub use std::arch::x86_64::{ #[repr(align(32))] struct Output([u32; 8]); +#[target_feature(enable = "avx")] unsafe extern "C" fn qcms_transform_data_template_lut_avx( mut transform: *const qcms_transform, mut src: *const libc::c_uchar, @@ -199,6 +200,7 @@ unsafe extern "C" fn qcms_transform_data_template_lut_avx( }; } #[no_mangle] +#[target_feature(enable = "avx")] pub unsafe extern "C" fn qcms_transform_data_rgb_out_lut_avx( mut transform: *const qcms_transform, mut src: *const libc::c_uchar, @@ -208,6 +210,7 @@ pub unsafe extern "C" fn qcms_transform_data_rgb_out_lut_avx( qcms_transform_data_template_lut_avx::(transform, src, dest, length); } #[no_mangle] +#[target_feature(enable = "avx")] pub unsafe extern "C" fn qcms_transform_data_rgba_out_lut_avx( mut transform: *const qcms_transform, mut src: *const libc::c_uchar, @@ -217,6 +220,7 @@ pub unsafe extern "C" fn qcms_transform_data_rgba_out_lut_avx( qcms_transform_data_template_lut_avx::(transform, src, dest, length); } #[no_mangle] +#[target_feature(enable = "avx")] pub unsafe extern "C" fn qcms_transform_data_bgra_out_lut_avx( mut transform: *const qcms_transform, mut src: *const libc::c_uchar, diff --git a/gfx/qcms/src/transform_neon.rs b/gfx/qcms/src/transform_neon.rs index b8536aee487d..30d62b480e11 100644 --- a/gfx/qcms/src/transform_neon.rs +++ b/gfx/qcms/src/transform_neon.rs @@ -9,6 +9,8 @@ use std::mem::zeroed; static mut floatScale: f32 = FLOATSCALE; static mut clampMaxValue: f32 = CLAMPMAXVAL; +#[target_feature(enable = "neon")] +#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))] unsafe extern "C" fn qcms_transform_data_template_lut_neon( mut transform: *const qcms_transform, mut src: *const libc::c_uchar, @@ -121,6 +123,8 @@ unsafe extern "C" fn qcms_transform_data_template_lut_neon( *dest.offset(F::kBIndex as isize) = *otdata_b.offset(vgetq_lane_s32(result, 2) as isize); } #[no_mangle] +#[target_feature(enable = "neon")] +#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))] pub unsafe extern "C" fn qcms_transform_data_rgb_out_lut_neon( mut transform: *const qcms_transform, mut src: *const libc::c_uchar, @@ -130,6 +134,8 @@ pub unsafe extern "C" fn qcms_transform_data_rgb_out_lut_neon( qcms_transform_data_template_lut_neon::(transform, src, dest, length); } #[no_mangle] +#[target_feature(enable = "neon")] +#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))] pub unsafe extern "C" fn qcms_transform_data_rgba_out_lut_neon( mut transform: *const qcms_transform, mut src: *const libc::c_uchar, @@ -140,6 +146,8 @@ pub unsafe extern "C" fn qcms_transform_data_rgba_out_lut_neon( } #[no_mangle] +#[target_feature(enable = "neon")] +#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))] pub unsafe extern "C" fn qcms_transform_data_bgra_out_lut_neon( mut transform: *const qcms_transform, mut src: *const libc::c_uchar,