Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ case ${TARGET} in
export RUSTFLAGS="${RUSTFLAGS} -C target-feature=+msa"
cargo_test "${PROFILE}"
;;
s390x*)
export RUSTFLAGS="${RUSTFLAGS} -C target-feature=+vector-enhancements-1"
cargo_test "${PROFILE}"
;;
powerpc64*)
# We don't build the ppc 32-bit targets with these - these targets
# are mostly unsupported for now.
Expand Down
23 changes: 23 additions & 0 deletions crates/core_arch/src/s390x/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
#![allow(unused_imports)] // FIXME remove when more tests are added

macro_rules! test_impl {
($fun:ident ($($v:ident : $ty:ty),*) -> $r:ty [$call:ident, _]) => {
#[inline]
#[target_feature(enable = "vector")]
pub unsafe fn $fun ($($v : $ty),*) -> $r {
$call ($($v),*)
}
};
($fun:ident +($($v:ident : $ty:ty),*) -> $r:ty [$call:ident, $instr:ident]) => {
#[inline]
#[target_feature(enable = "vector")]
Expand All @@ -10,6 +17,22 @@ macro_rules! test_impl {
transmute($call ($($v),*))
}
};
($fun:ident +($($v:ident : $ty:ty),*) -> $r:ty [$call:ident, $tf:literal $instr:ident]) => {
#[inline]
#[target_feature(enable = "vector")]
#[cfg_attr(all(test, target_feature = $tf), assert_instr($instr))]
pub unsafe fn $fun ($($v : $ty),*) -> $r {
transmute($call ($($v),*))
}
};
($fun:ident ($($v:ident : $ty:ty),*) -> $r:ty [$call:ident, $tf:literal $instr:ident]) => {
#[inline]
#[target_feature(enable = "vector")]
#[cfg_attr(all(test, target_feature = $tf), assert_instr($instr))]
pub unsafe fn $fun ($($v : $ty),*) -> $r {
$call ($($v),*)
}
};
($fun:ident ($($v:ident : $ty:ty),*) -> $r:ty [$call:ident, $instr:ident]) => {
#[inline]
#[target_feature(enable = "vector")]
Expand Down
Loading