Bug 1667875. Make sure that we enable the instruction set that we're using. r=aosmond

Without this the intrinsics end up as calls instead of inline

Differential Revision: https://phabricator.services.mozilla.com/D91639
This commit is contained in:
Jeff Muizelaar 2020-09-28 21:04:30 +00:00
Родитель 8d33f33d15
Коммит 6f690d3efc
2 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -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<F: Format>(
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<F: Format>(
};
}
#[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::<RGB>(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::<RGBA>(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,

Просмотреть файл

@ -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<F: Format>(
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<F: Format>(
*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::<RGB>(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,