Add vec_mfvscr

This commit is contained in:
Luca Barbato 2023-06-25 07:10:30 +00:00 committed by Amanieu d'Antras
parent 3bdfa0f20e
commit 34e8658bae

View file

@ -318,6 +318,9 @@ extern "C" {
fn vupkhsh(a: vector_signed_short) -> vector_signed_int;
#[link_name = "llvm.ppc.altivec.vupklsh"]
fn vupklsh(a: vector_signed_short) -> vector_signed_int;
#[link_name = "llvm.ppc.altivec.mfvscr"]
fn mfvscr() -> vector_unsigned_short;
}
macro_rules! s_t_l {
@ -2737,6 +2740,14 @@ where
a.vec_max(b)
}
/// Move From Vector Status and Control Register.
#[inline]
#[target_feature(enable = "altivec")]
#[cfg_attr(test, assert_instr(mfvscr))]
pub unsafe fn vec_mfvscr() -> vector_unsigned_short {
mfvscr()
}
/// Vector add.
#[inline]
#[target_feature(enable = "altivec")]