Add vec_loge
This commit is contained in:
parent
34e8658bae
commit
d834f538b4
1 changed files with 11 additions and 0 deletions
|
|
@ -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")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue