Replace the crypto feature with aes in generated intrinsics for aarch64
This allows us to deprecate the crypto target_feature in favour of its
subfeatures.
We cannot do this yet for ARM targets as LLVM requires the crypto
feature. This was fixed in
b8baa2a913
This commit is contained in:
parent
5800a3624a
commit
8cb8cd2142
4 changed files with 15 additions and 15 deletions
|
|
@ -4672,7 +4672,7 @@ pub unsafe fn vmull_high_u32(a: uint32x4_t, b: uint32x4_t) -> uint64x2_t {
|
|||
|
||||
/// Polynomial multiply long
|
||||
#[inline]
|
||||
#[target_feature(enable = "neon,crypto")]
|
||||
#[target_feature(enable = "neon,aes")]
|
||||
#[cfg_attr(test, assert_instr(pmull))]
|
||||
pub unsafe fn vmull_p64(a: p64, b: p64) -> p128 {
|
||||
#[allow(improper_ctypes)]
|
||||
|
|
@ -4695,7 +4695,7 @@ pub unsafe fn vmull_high_p8(a: poly8x16_t, b: poly8x16_t) -> poly16x8_t {
|
|||
|
||||
/// Polynomial multiply long
|
||||
#[inline]
|
||||
#[target_feature(enable = "neon,crypto")]
|
||||
#[target_feature(enable = "neon,aes")]
|
||||
#[cfg_attr(test, assert_instr(pmull))]
|
||||
pub unsafe fn vmull_high_p64(a: poly64x2_t, b: poly64x2_t) -> p128 {
|
||||
vmull_p64(simd_extract(a, 1), simd_extract(b, 1))
|
||||
|
|
|
|||
|
|
@ -2086,7 +2086,7 @@ pub unsafe fn vcreate_p16(a: u64) -> poly16x4_t {
|
|||
|
||||
/// Insert vector element from another vector element
|
||||
#[inline]
|
||||
#[target_feature(enable = "neon,crypto")]
|
||||
#[target_feature(enable = "neon,aes")]
|
||||
#[cfg_attr(target_arch = "arm", target_feature(enable = "crypto,v8"))]
|
||||
#[cfg_attr(all(test, target_arch = "arm"), assert_instr(nop))]
|
||||
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr(nop))]
|
||||
|
|
@ -13212,7 +13212,7 @@ pub unsafe fn vset_lane_p16<const LANE: i32>(a: p16, b: poly16x4_t) -> poly16x4_
|
|||
|
||||
/// Insert vector element from another vector element
|
||||
#[inline]
|
||||
#[target_feature(enable = "neon,crypto")]
|
||||
#[target_feature(enable = "neon,aes")]
|
||||
#[cfg_attr(target_arch = "arm", target_feature(enable = "crypto,v8"))]
|
||||
#[cfg_attr(all(test, target_arch = "arm"), assert_instr(nop, LANE = 0))]
|
||||
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr(nop, LANE = 0))]
|
||||
|
|
@ -13344,7 +13344,7 @@ pub unsafe fn vsetq_lane_p16<const LANE: i32>(a: p16, b: poly16x8_t) -> poly16x8
|
|||
|
||||
/// Insert vector element from another vector element
|
||||
#[inline]
|
||||
#[target_feature(enable = "neon,crypto")]
|
||||
#[target_feature(enable = "neon,aes")]
|
||||
#[cfg_attr(target_arch = "arm", target_feature(enable = "crypto,v8"))]
|
||||
#[cfg_attr(all(test, target_arch = "arm"), assert_instr(nop, LANE = 0))]
|
||||
#[cfg_attr(all(test, target_arch = "aarch64"), assert_instr(nop, LANE = 0))]
|
||||
|
|
|
|||
|
|
@ -851,7 +851,7 @@ arm = nop
|
|||
generate u64:int8x8_t, u64:int16x4_t: u64:int32x2_t, u64:int64x1_t
|
||||
generate u64:uint8x8_t, u64:uint16x4_t: u64:uint32x2_t, u64:uint64x1_t
|
||||
generate u64:poly8x8_t, u64:poly16x4_t
|
||||
target = crypto
|
||||
target = aes
|
||||
generate u64:poly64x1_t
|
||||
|
||||
/// Insert vector element from another vector element
|
||||
|
|
@ -2238,7 +2238,7 @@ no-q
|
|||
a = 15
|
||||
b = 3
|
||||
validate 17
|
||||
target = crypto
|
||||
target = aes
|
||||
|
||||
aarch64 = pmull
|
||||
link-aarch64 = pmull64:p64:p64:p64:int8x16_t
|
||||
|
|
@ -2269,7 +2269,7 @@ multi_fn = vmull-noqself-noext, {simd_extract, a, 1}, {simd_extract, b, 1}
|
|||
a = 1, 15
|
||||
b = 1, 3
|
||||
validate 17
|
||||
target = crypto
|
||||
target = aes
|
||||
|
||||
aarch64 = pmull
|
||||
generate poly64x2_t:poly64x2_t:p128
|
||||
|
|
@ -4582,7 +4582,7 @@ generate u8:uint8x8_t:uint8x8_t, u16:uint16x4_t:uint16x4_t
|
|||
generate u32:uint32x2_t:uint32x2_t, u64:uint64x1_t:uint64x1_t
|
||||
generate p8:poly8x8_t:poly8x8_t, p16:poly16x4_t:poly16x4_t
|
||||
|
||||
target = crypto
|
||||
target = aes
|
||||
generate p64:poly64x1_t:poly64x1_t
|
||||
|
||||
/// Insert vector element from another vector element
|
||||
|
|
@ -4604,7 +4604,7 @@ generate u8:uint8x16_t:uint8x16_t, u16:uint16x8_t:uint16x8_t
|
|||
generate u32:uint32x4_t:uint32x4_t, u64:uint64x2_t:uint64x2_t
|
||||
generate p8:poly8x16_t:poly8x16_t, p16:poly16x8_t:poly16x8_t
|
||||
|
||||
target = crypto
|
||||
target = aes
|
||||
generate p64:poly64x2_t:poly64x2_t
|
||||
|
||||
/// Insert vector element from another vector element
|
||||
|
|
|
|||
|
|
@ -379,7 +379,7 @@ enum TargetFeature {
|
|||
Default,
|
||||
ArmV7,
|
||||
FPArmV8,
|
||||
Crypto,
|
||||
AES,
|
||||
}
|
||||
|
||||
fn type_to_global_type(t: &str) -> &str {
|
||||
|
|
@ -891,7 +891,7 @@ fn gen_aarch64(
|
|||
Default => "neon",
|
||||
ArmV7 => "v7",
|
||||
FPArmV8 => "fp-armv8,v8",
|
||||
Crypto => "neon,crypto",
|
||||
AES => "neon,aes",
|
||||
};
|
||||
let current_fn = if let Some(current_fn) = current_fn.clone() {
|
||||
if link_aarch64.is_some() {
|
||||
|
|
@ -1341,13 +1341,13 @@ fn gen_arm(
|
|||
Default => "neon",
|
||||
ArmV7 => "neon",
|
||||
FPArmV8 => "neon",
|
||||
Crypto => "neon,crypto",
|
||||
AES => "neon,aes",
|
||||
};
|
||||
let current_target_arm = match target {
|
||||
Default => "v7",
|
||||
ArmV7 => "v7",
|
||||
FPArmV8 => "fp-armv8,v8",
|
||||
Crypto => "crypto,v8",
|
||||
AES => "crypto,v8", // TODO: Replace with AES when the minimum LLVM version has b8baa2a9132498ea286dbb0d03f005760ecc6fdb
|
||||
};
|
||||
|
||||
let current_fn = if let Some(current_fn) = current_fn.clone() {
|
||||
|
|
@ -2552,7 +2552,7 @@ mod test {
|
|||
Some(input) => match input.as_str() {
|
||||
"v7" => ArmV7,
|
||||
"fp-armv8" => FPArmV8,
|
||||
"crypto" => Crypto,
|
||||
"aes" => AES,
|
||||
_ => Default,
|
||||
},
|
||||
_ => Default,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue