move __m64 to the v64 module

This commit is contained in:
gnzlbg 2017-11-29 11:36:46 +01:00 committed by Andrew Gallant
parent 8c13c1e4a3
commit 5fb068f74c
4 changed files with 20 additions and 18 deletions

View file

@ -29,12 +29,20 @@ define_impl! { u8x8, u8, 8, i8x8, x0, x1, x2, x3, x4, x5, x6, x7 }
define_ty! { i8x8, i8, i8, i8, i8, i8, i8, i8, i8 }
define_impl! { i8x8, i8, 8, i8x8, x0, x1, x2, x3, x4, x5, x6, x7 }
define_from!(u32x2, i32x2, u16x4, i16x4, u8x8, i8x8);
define_from!(i32x2, u32x2, u16x4, i16x4, u8x8, i8x8);
define_from!(u16x4, u32x2, i32x2, i16x4, u8x8, i8x8);
define_from!(i16x4, u32x2, i32x2, u16x4, u8x8, i8x8);
define_from!(u8x8, u32x2, i32x2, u16x4, i16x4, i8x8);
define_from!(i8x8, u32x2, i32x2, u16x4, i16x4, u8x8);
// On `x86` corresponds to llvm's `x86_mmx` type.
define_ty_doc! {
__m64, i64 |
/// 64-bit wide integer vector type.
}
define_impl! { __m64, i64, 1, __m64, x0 }
define_from!(u32x2, i32x2, u16x4, i16x4, u8x8, i8x8, __m64);
define_from!(i32x2, u32x2, u16x4, i16x4, u8x8, i8x8, __m64);
define_from!(u16x4, u32x2, i32x2, i16x4, u8x8, i8x8, __m64);
define_from!(i16x4, u32x2, i32x2, u16x4, u8x8, i8x8, __m64);
define_from!(u8x8, u32x2, i32x2, u16x4, i16x4, i8x8, __m64);
define_from!(i8x8, u32x2, i32x2, u16x4, i16x4, u8x8, __m64);
define_from!(__m64, i8x8, u32x2, i32x2, u16x4, i16x4, u8x8);
define_common_ops!(f32x2, u32x2, i32x2, u16x4, i16x4, u8x8, i8x8);
define_float_ops!(f32x2);
@ -67,7 +75,9 @@ define_casts!(
(u16x4, u32x4, as_u32x4),
(u16x4, i32x4, as_i32x4),
(u32x2, u64x2, as_u64x2),
(u32x2, i64x2, as_i64x2)
(u32x2, i64x2, as_i64x2) /* FIXME:
* (__m64, __m128i, as___m128i),
* (__m64, __m256i, as___m256i) */
);
#[cfg(test)]

View file

@ -8,8 +8,7 @@
//!
//! [intel64_ref]: http://www.intel.de/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf
use v64::{i16x4, i32x2, i8x8};
use x86::__m64;
use v64::{__m64, i16x4, i32x2, i8x8};
use core::mem;
#[cfg(test)]
@ -59,9 +58,8 @@ extern "C" {
#[cfg(test)]
mod tests {
use v64::{i16x4, i32x2, i8x8};
use v64::{__m64, i16x4, i32x2, i8x8};
use x86::i686::mmx;
use x86::__m64;
use stdsimd_test::simd_test;
#[simd_test = "sse"] // FIXME: should be mmx

View file

@ -1,8 +1,7 @@
//! `i686` Streaming SIMD Extensions (SSE)
use v128::f32x4;
use v64::{i16x4, i32x2, i8x8, u16x4, u8x8};
use x86::__m64;
use v64::{__m64, i16x4, i32x2, i8x8, u16x4, u8x8};
use core::mem;
use x86::i586;
use x86::i686::mmx;

View file

@ -26,11 +26,6 @@ mod x86_64;
#[cfg(target_arch = "x86_64")]
pub use self::x86_64::*;
/// 64-bit wide integer vector type.
#[allow(non_camel_case_types)]
#[repr(simd)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
pub struct __m64(i64); // corresponds to llvm's `x86_mmx` type
/// 128-bit wide signed integer vector type
#[allow(non_camel_case_types)]
pub type __m128i = ::v128::i8x16;