diff options
| author | Luca Barbato <lu_zero@gentoo.org> | 2024-04-15 13:53:35 +0000 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2024-04-16 12:16:09 +0200 |
| commit | c806df3160285c3e91d6dd9390830e2d58d653f3 (patch) | |
| tree | 4a257d98c6aae1239fb1e3e93478ff282c8134d3 | |
| parent | 5b0b9e9db2ee4a1b9536f1baa29c6bef2f3c72c7 (diff) | |
| download | rust-c806df3160285c3e91d6dd9390830e2d58d653f3.tar.gz rust-c806df3160285c3e91d6dd9390830e2d58d653f3.zip | |
Consider power9-vector when testing instructions
| -rw-r--r-- | library/stdarch/crates/core_arch/src/powerpc/macros.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/library/stdarch/crates/core_arch/src/powerpc/macros.rs b/library/stdarch/crates/core_arch/src/powerpc/macros.rs index bd92ea17dec..1225c046c6b 100644 --- a/library/stdarch/crates/core_arch/src/powerpc/macros.rs +++ b/library/stdarch/crates/core_arch/src/powerpc/macros.rs @@ -8,10 +8,14 @@ macro_rules! test_impl { } }; ($fun:ident ($($v:ident : $ty:ty),*) -> $r:ty [$call:ident, $instr_altivec:ident / $instr_vsx:ident]) => { + test_impl! { $fun ($($v : $ty),*) -> $r [$call, $instr_altivec / $instr_vsx / $instr_vsx] } + }; + ($fun:ident ($($v:ident : $ty:ty),*) -> $r:ty [$call:ident, $instr_altivec:ident / $instr_vsx:ident / $instr_pwr9:ident]) => { #[inline] #[target_feature(enable = "altivec")] - #[cfg_attr(all(test, not(target_feature="vsx")), assert_instr($instr_altivec))] - #[cfg_attr(all(test, target_feature="vsx"), assert_instr($instr_vsx))] + #[cfg_attr(all(test, not(target_feature="vsx"), not(target_feature = "power9-vector")), assert_instr($instr_altivec))] + #[cfg_attr(all(test, target_feature="vsx", not(target_feature = "power9-vector")), assert_instr($instr_vsx))] + #[cfg_attr(all(test, not(target_feature="vsx"), target_feature = "power9-vector"), assert_instr($instr_pwr9))] pub unsafe fn $fun ($($v : $ty),*) -> $r { $call ($($v),*) } |
