summaryrefslogtreecommitdiffstats
path: root/library/stdarch/crates/stdarch-gen/src
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
commitc23a457e72abe608715ac76f076f47dc42af07a5 (patch)
tree2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /library/stdarch/crates/stdarch-gen/src
parentReleasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz
rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'library/stdarch/crates/stdarch-gen/src')
-rw-r--r--library/stdarch/crates/stdarch-gen/src/main.rs21
1 files changed, 20 insertions, 1 deletions
diff --git a/library/stdarch/crates/stdarch-gen/src/main.rs b/library/stdarch/crates/stdarch-gen/src/main.rs
index 652aee88c..8e2bea0e2 100644
--- a/library/stdarch/crates/stdarch-gen/src/main.rs
+++ b/library/stdarch/crates/stdarch-gen/src/main.rs
@@ -799,6 +799,19 @@ fn type_to_half(t: &str) -> &str {
}
}
+fn type_with_merged_lanes(t: &str, elements_per_lane: usize) -> String {
+ assert_eq!(type_len(t) % elements_per_lane, 0);
+ let prefix_len = t
+ .find(|c: char| c.is_ascii_digit())
+ .unwrap_or_else(|| t.len());
+ format!(
+ "{prefix}{bits}x{len}_t",
+ prefix = &t[0..prefix_len],
+ bits = type_bits(t) * elements_per_lane,
+ len = type_len(t) / elements_per_lane
+ )
+}
+
fn asc(start: i32, len: usize) -> String {
let mut s = String::from("[");
for i in 0..len {
@@ -2515,7 +2528,7 @@ fn gen_arm(
{function_doc}
#[inline]
-#[cfg(target_arch = "aarch64")]{target_feature_aarch64}
+#[cfg(not(target_arch = "arm"))]{target_feature_aarch64}
#[cfg_attr(test, assert_instr({assert_aarch64}{const_assert}))]{const_legacy}{stable_aarch64}
{call_aarch64}
"#,
@@ -2993,6 +3006,12 @@ fn get_call(
re = Some((re_params[0].clone(), in_t[1].to_string()));
} else if re_params[1] == "out_t" {
re = Some((re_params[0].clone(), out_t.to_string()));
+ } else if re_params[1] == "out_unsigned" {
+ re = Some((re_params[0].clone(), type_to_unsigned(out_t).to_string()));
+ } else if re_params[1] == "out_signed" {
+ re = Some((re_params[0].clone(), type_to_signed(out_t).to_string()));
+ } else if re_params[1] == "merge4_t2" {
+ re = Some((re_params[0].clone(), type_with_merged_lanes(in_t[2], 4)));
} else if re_params[1] == "half" {
re = Some((re_params[0].clone(), type_to_half(in_t[1]).to_string()));
} else if re_params[1] == "in_ntt" {