Skip to content

Commit 107eb8b

Browse files
lu-zeroAmanieu
authored andcommitted
Consider power9-vector when testing instructions
1 parent 4e4151e commit 107eb8b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

crates/core_arch/src/powerpc/macros.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ macro_rules! test_impl {
88
}
99
};
1010
($fun:ident ($($v:ident : $ty:ty),*) -> $r:ty [$call:ident, $instr_altivec:ident / $instr_vsx:ident]) => {
11+
test_impl! { $fun ($($v : $ty),*) -> $r [$call, $instr_altivec / $instr_vsx / $instr_vsx] }
12+
};
13+
($fun:ident ($($v:ident : $ty:ty),*) -> $r:ty [$call:ident, $instr_altivec:ident / $instr_vsx:ident / $instr_pwr9:ident]) => {
1114
#[inline]
1215
#[target_feature(enable = "altivec")]
13-
#[cfg_attr(all(test, not(target_feature="vsx")), assert_instr($instr_altivec))]
14-
#[cfg_attr(all(test, target_feature="vsx"), assert_instr($instr_vsx))]
16+
#[cfg_attr(all(test, not(target_feature="vsx"), not(target_feature = "power9-vector")), assert_instr($instr_altivec))]
17+
#[cfg_attr(all(test, target_feature="vsx", not(target_feature = "power9-vector")), assert_instr($instr_vsx))]
18+
#[cfg_attr(all(test, not(target_feature="vsx"), target_feature = "power9-vector"), assert_instr($instr_pwr9))]
1519
pub unsafe fn $fun ($($v : $ty),*) -> $r {
1620
$call ($($v),*)
1721
}

0 commit comments

Comments
 (0)