Add vec_loge

This commit is contained in:
Luca Barbato 2023-06-25 07:24:38 +00:00 committed by Amanieu d'Antras
parent 34e8658bae
commit d834f538b4

View file

@ -321,6 +321,9 @@ extern "C" {
#[link_name = "llvm.ppc.altivec.mfvscr"]
fn mfvscr() -> vector_unsigned_short;
#[link_name = "llvm.ppc.altivec.vlogefp"]
fn vlogefp(a: vector_float) -> vector_float;
}
macro_rules! s_t_l {
@ -2504,6 +2507,14 @@ where
p.vec_lde(off)
}
/// Vector Base-2 Logarithm Estimate
#[inline]
#[target_feature(enable = "altivec")]
#[cfg_attr(test, assert_instr(vlogefp))]
pub unsafe fn vec_loge(a: vector_float) -> vector_float {
vlogefp(a)
}
/// Vector floor.
#[inline]
#[target_feature(enable = "altivec")]