Skip to content

Commit de7f56f

Browse files
JamesbarfordAmanieu
authored andcommitted
Add aarch64_unstable_target_feature and relax instruction assertion
1 parent 1088aae commit de7f56f

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

library/stdarch/crates/core_arch/src/aarch64/neon/generated.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ pub fn vaddvq_u64(a: uint64x2_t) -> u64 {
827827
#[doc = " * Neon instrinsic unsafe"]
828828
#[inline]
829829
#[target_feature(enable = "neon,faminmax")]
830-
#[cfg_attr(test, assert_instr(famax))]
830+
#[cfg_attr(test, assert_instr(nop))]
831831
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
832832
pub unsafe fn vamax_f32(a: float32x2_t, b: float32x2_t) -> float32x2_t {
833833
unsafe extern "unadjusted" {
@@ -845,7 +845,7 @@ pub unsafe fn vamax_f32(a: float32x2_t, b: float32x2_t) -> float32x2_t {
845845
#[doc = " * Neon instrinsic unsafe"]
846846
#[inline]
847847
#[target_feature(enable = "neon,faminmax")]
848-
#[cfg_attr(test, assert_instr(famax))]
848+
#[cfg_attr(test, assert_instr(nop))]
849849
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
850850
pub unsafe fn vamaxq_f32(a: float32x4_t, b: float32x4_t) -> float32x4_t {
851851
unsafe extern "unadjusted" {
@@ -863,7 +863,7 @@ pub unsafe fn vamaxq_f32(a: float32x4_t, b: float32x4_t) -> float32x4_t {
863863
#[doc = " * Neon instrinsic unsafe"]
864864
#[inline]
865865
#[target_feature(enable = "neon,faminmax")]
866-
#[cfg_attr(test, assert_instr(famax))]
866+
#[cfg_attr(test, assert_instr(nop))]
867867
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
868868
pub unsafe fn vamaxq_f64(a: float64x2_t, b: float64x2_t) -> float64x2_t {
869869
unsafe extern "unadjusted" {
@@ -881,7 +881,7 @@ pub unsafe fn vamaxq_f64(a: float64x2_t, b: float64x2_t) -> float64x2_t {
881881
#[doc = " * Neon instrinsic unsafe"]
882882
#[inline]
883883
#[target_feature(enable = "neon,faminmax")]
884-
#[cfg_attr(test, assert_instr(famin))]
884+
#[cfg_attr(test, assert_instr(nop))]
885885
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
886886
pub unsafe fn vamin_f32(a: float32x2_t, b: float32x2_t) -> float32x2_t {
887887
unsafe extern "unadjusted" {
@@ -899,7 +899,7 @@ pub unsafe fn vamin_f32(a: float32x2_t, b: float32x2_t) -> float32x2_t {
899899
#[doc = " * Neon instrinsic unsafe"]
900900
#[inline]
901901
#[target_feature(enable = "neon,faminmax")]
902-
#[cfg_attr(test, assert_instr(famin))]
902+
#[cfg_attr(test, assert_instr(nop))]
903903
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
904904
pub unsafe fn vaminq_f32(a: float32x4_t, b: float32x4_t) -> float32x4_t {
905905
unsafe extern "unadjusted" {
@@ -917,7 +917,7 @@ pub unsafe fn vaminq_f32(a: float32x4_t, b: float32x4_t) -> float32x4_t {
917917
#[doc = " * Neon instrinsic unsafe"]
918918
#[inline]
919919
#[target_feature(enable = "neon,faminmax")]
920-
#[cfg_attr(test, assert_instr(famin))]
920+
#[cfg_attr(test, assert_instr(nop))]
921921
#[stable(feature = "neon_intrinsics", since = "1.59.0")]
922922
pub unsafe fn vaminq_f64(a: float64x2_t, b: float64x2_t) -> float64x2_t {
923923
unsafe extern "unadjusted" {

library/stdarch/crates/core_arch/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
sha512_sm_x86,
3838
x86_amx_intrinsics,
3939
f16,
40-
keylocker_x86
40+
keylocker_x86,
41+
aarch64_unstable_target_feature
4142
)]
4243
#![cfg_attr(test, feature(test, abi_vectorcall, stdarch_internal))]
4344
#![deny(clippy::missing_inline_in_public_items)]

library/stdarch/crates/intrinsic-test/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ fn compile_c(
240240
let arch_flags = if target.contains("v7") {
241241
"-march=armv8.6-a+crypto+crc+dotprod+fp16"
242242
} else {
243-
"-march=armv8.6-a+crypto+sha3+crc+dotprod+fp16"
243+
"-march=armv8.6-a+crypto+sha3+crc+dotprod+fp16+faminmax"
244+
} else {
244245
};
245246

246247
let intrinsic_name = &intrinsic.name;

library/stdarch/crates/stdarch-gen-arm/spec/neon/aarch64.spec.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13980,7 +13980,7 @@ intrinsics:
1398013980
return_type: "{neon_type}"
1398113981
attr:
1398213982
- FnCall: [target_feature, ['enable = "neon,faminmax"']]
13983-
- FnCall: [cfg_attr, [test, {FnCall: [assert_instr, [famax]]}]]
13983+
- FnCall: [cfg_attr, [test, {FnCall: [assert_instr, [nop]]}]]
1398413984
- FnCall: [stable, ['feature = "neon_intrinsics"', 'since = "1.59.0"']]
1398513985
safety:
1398613986
unsafe: [neon]
@@ -14001,7 +14001,7 @@ intrinsics:
1400114001
return_type: "{neon_type}"
1400214002
attr:
1400314003
- FnCall: [target_feature, ['enable = "neon,faminmax"']]
14004-
- FnCall: [cfg_attr, [test, {FnCall: [assert_instr, [famin]]}]]
14004+
- FnCall: [cfg_attr, [test, {FnCall: [assert_instr, [nop]]}]]
1400514005
- FnCall: [stable, ['feature = "neon_intrinsics"', 'since = "1.59.0"']]
1400614006
safety:
1400714007
unsafe: [neon]

0 commit comments

Comments
 (0)