parent
94867fad87
commit
08e8e220fc
3 changed files with 2 additions and 30 deletions
|
|
@ -1,16 +1,9 @@
|
|||
use crate::core_arch::arm_shared::neon::*;
|
||||
use crate::core_arch::simd::{f32x4, i32x4, u32x4};
|
||||
use crate::core_arch::simd_llvm::*;
|
||||
use crate::mem::{align_of, transmute};
|
||||
|
||||
#[cfg(test)]
|
||||
use stdarch_test::assert_instr;
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
pub(crate) type p8 = u8;
|
||||
#[allow(non_camel_case_types)]
|
||||
pub(crate) type p16 = u16;
|
||||
|
||||
#[allow(improper_ctypes)]
|
||||
extern "unadjusted" {
|
||||
#[link_name = "llvm.arm.neon.vbsl.v8i8"]
|
||||
|
|
@ -794,27 +787,6 @@ pub unsafe fn vtbx4_p8(a: poly8x8_t, b: poly8x8x4_t, c: uint8x8_t) -> poly8x8_t
|
|||
))
|
||||
}
|
||||
|
||||
// These float-to-int implementations have undefined behaviour when `a` overflows
|
||||
// the destination type. Clang has the same problem: https://llvm.org/PR47510
|
||||
|
||||
/// Floating-point Convert to Signed fixed-point, rounding toward Zero (vector)
|
||||
#[inline]
|
||||
#[target_feature(enable = "neon")]
|
||||
#[target_feature(enable = "v7")]
|
||||
#[cfg_attr(test, assert_instr("vcvt.s32.f32"))]
|
||||
pub unsafe fn vcvtq_s32_f32(a: float32x4_t) -> int32x4_t {
|
||||
transmute(simd_cast::<_, i32x4>(transmute::<_, f32x4>(a)))
|
||||
}
|
||||
|
||||
/// Floating-point Convert to Unsigned fixed-point, rounding toward Zero (vector)
|
||||
#[inline]
|
||||
#[target_feature(enable = "neon")]
|
||||
#[target_feature(enable = "v7")]
|
||||
#[cfg_attr(test, assert_instr("vcvt.u32.f32"))]
|
||||
pub unsafe fn vcvtq_u32_f32(a: float32x4_t) -> uint32x4_t {
|
||||
transmute(simd_cast::<_, u32x4>(transmute::<_, f32x4>(a)))
|
||||
}
|
||||
|
||||
/// Shift Left and Insert (immediate)
|
||||
#[inline]
|
||||
#[target_feature(enable = "neon,v7")]
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ pub fn i32x4_relaxed_dot_i8x16_i7x16_add(a: v128, b: v128, c: v128) -> v128 {
|
|||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub mod tests {
|
||||
mod tests {
|
||||
use super::super::simd128::*;
|
||||
use super::*;
|
||||
use core::ops::{Add, Div, Mul, Neg, Sub};
|
||||
|
|
|
|||
|
|
@ -4226,7 +4226,7 @@ pub fn f64x2_promote_low_f32x4(a: v128) -> v128 {
|
|||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub mod tests {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use core::ops::{Add, Div, Mul, Neg, Sub};
|
||||
use std;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue