Skip to content

Commit 7ab9571

Browse files
folkertdevAmanieu
authored andcommitted
implement VectorAdd for s390x
1 parent 68932d1 commit 7ab9571

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

crates/core_arch/src/s390x/vector.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,16 @@ mod sealed {
131131

132132
impl_add!(va_double, vector_double, vfadb);
133133

134+
#[inline]
135+
#[target_feature(enable = "vector")]
134136
// FIXME: "vfasb" is part of vector enhancements 1, add a test for it when possible
137+
// #[cfg_attr(test, assert_instr(vfasb))]
138+
pub unsafe fn va_float(a: vector_float, b: vector_float) -> vector_float {
139+
transmute(simd_add(a, b))
140+
}
141+
135142
#[unstable(feature = "stdarch_s390x", issue = "135681")]
136-
impl VectorAdd<Self> for f32 {
143+
impl VectorAdd<Self> for vector_float {
137144
type Result = Self;
138145

139146
#[inline]
@@ -145,7 +152,7 @@ mod sealed {
145152
}
146153
}
147154

148-
/// Vector add.
155+
/// Vector pointwise addition.
149156
#[inline]
150157
#[target_feature(enable = "vector")]
151158
#[unstable(feature = "stdarch_s390x", issue = "135681")]

0 commit comments

Comments
 (0)