core_arch: Add LoongArch LSX intrinsics
Co-authored-by: WANG Rui <wangrui@loongson.cn>
This commit is contained in:
parent
a66ae3ec9e
commit
9a8f1dac0e
8 changed files with 15688 additions and 0 deletions
|
|
@ -24,6 +24,7 @@
|
|||
avx512_target_feature,
|
||||
mips_target_feature,
|
||||
powerpc_target_feature,
|
||||
loongarch_target_feature,
|
||||
wasm_target_feature,
|
||||
abi_unadjusted,
|
||||
rtm_target_feature,
|
||||
|
|
|
|||
6843
library/stdarch/crates/core_arch/src/loongarch64/lsx/generated.rs
Normal file
6843
library/stdarch/crates/core_arch/src/loongarch64/lsx/generated.rs
Normal file
File diff suppressed because it is too large
Load diff
13
library/stdarch/crates/core_arch/src/loongarch64/lsx/mod.rs
Normal file
13
library/stdarch/crates/core_arch/src/loongarch64/lsx/mod.rs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
//! LoongArch64 LSX intrinsics
|
||||
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
#[rustfmt::skip]
|
||||
mod types;
|
||||
|
||||
#[rustfmt::skip]
|
||||
mod generated;
|
||||
|
||||
#[rustfmt::skip]
|
||||
#[unstable(feature = "stdarch_loongarch", issue = "117427")]
|
||||
pub use self::generated::*;
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
types! {
|
||||
/// LOONGARCH-specific 128-bit wide vector of 16 packed `i8`.
|
||||
#[unstable(feature = "stdarch_loongarch", issue = "117427")]
|
||||
pub struct v16i8(pub(crate) i8, pub(crate) i8, pub(crate) i8, pub(crate) i8, pub(crate) i8, pub(crate) i8, pub(crate) i8, pub(crate) i8, pub(crate) i8, pub(crate) i8, pub(crate) i8, pub(crate) i8, pub(crate) i8, pub(crate) i8, pub(crate) i8, pub(crate) i8);
|
||||
|
||||
/// LOONGARCH-specific 128-bit wide vector of 8 packed `i16`.
|
||||
#[unstable(feature = "stdarch_loongarch", issue = "117427")]
|
||||
pub struct v8i16(pub(crate) i16, pub(crate) i16, pub(crate) i16, pub(crate) i16, pub(crate) i16, pub(crate) i16, pub(crate) i16, pub(crate) i16);
|
||||
|
||||
/// LOONGARCH-specific 128-bit wide vector of 4 packed `i32`.
|
||||
#[unstable(feature = "stdarch_loongarch", issue = "117427")]
|
||||
pub struct v4i32(pub(crate) i32, pub(crate) i32, pub(crate) i32, pub(crate) i32);
|
||||
|
||||
/// LOONGARCH-specific 128-bit wide vector of 2 packed `i64`.
|
||||
#[unstable(feature = "stdarch_loongarch", issue = "117427")]
|
||||
pub struct v2i64(pub(crate) i64, pub(crate) i64);
|
||||
|
||||
/// LOONGARCH-specific 128-bit wide vector of 16 packed `u8`.
|
||||
#[unstable(feature = "stdarch_loongarch", issue = "117427")]
|
||||
pub struct v16u8(pub(crate) u8, pub(crate) u8, pub(crate) u8, pub(crate) u8, pub(crate) u8, pub(crate) u8, pub(crate) u8, pub(crate) u8, pub(crate) u8, pub(crate) u8, pub(crate) u8, pub(crate) u8, pub(crate) u8, pub(crate) u8, pub(crate) u8, pub(crate) u8);
|
||||
|
||||
/// LOONGARCH-specific 128-bit wide vector of 8 packed `u16`.
|
||||
#[unstable(feature = "stdarch_loongarch", issue = "117427")]
|
||||
pub struct v8u16(pub(crate) u16, pub(crate) u16, pub(crate) u16, pub(crate) u16, pub(crate) u16, pub(crate) u16, pub(crate) u16, pub(crate) u16);
|
||||
|
||||
/// LOONGARCH-specific 128-bit wide vector of 4 packed `u32`.
|
||||
#[unstable(feature = "stdarch_loongarch", issue = "117427")]
|
||||
pub struct v4u32(pub(crate) u32, pub(crate) u32, pub(crate) u32, pub(crate) u32);
|
||||
|
||||
/// LOONGARCH-specific 128-bit wide vector of 2 packed `u64`.
|
||||
#[unstable(feature = "stdarch_loongarch", issue = "117427")]
|
||||
pub struct v2u64(pub(crate) u64, pub(crate) u64);
|
||||
|
||||
/// LOONGARCH-specific 128-bit wide vector of 4 packed `f32`.
|
||||
#[unstable(feature = "stdarch_loongarch", issue = "117427")]
|
||||
pub struct v4f32(pub(crate) f32, pub(crate) f32, pub(crate) f32, pub(crate) f32);
|
||||
|
||||
/// LOONGARCH-specific 128-bit wide vector of 2 packed `f64`.
|
||||
#[unstable(feature = "stdarch_loongarch", issue = "117427")]
|
||||
pub struct v2f64(pub(crate) f64, pub(crate) f64);
|
||||
}
|
||||
6
library/stdarch/crates/core_arch/src/loongarch64/mod.rs
Normal file
6
library/stdarch/crates/core_arch/src/loongarch64/mod.rs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
//! `LoongArch` intrinsics
|
||||
|
||||
mod lsx;
|
||||
|
||||
#[unstable(feature = "stdarch_loongarch", issue = "117427")]
|
||||
pub use self::lsx::*;
|
||||
|
|
@ -263,6 +263,16 @@ pub mod arch {
|
|||
pub mod nvptx {
|
||||
pub use crate::core_arch::nvptx::*;
|
||||
}
|
||||
|
||||
/// Platform-specific intrinsics for the `loongarch` platform.
|
||||
///
|
||||
/// See the [module documentation](../index.html) for more details.
|
||||
#[cfg(any(target_arch = "loongarch64", doc))]
|
||||
#[doc(cfg(target_arch = "loongarch64"))]
|
||||
#[unstable(feature = "stdarch_loongarch", issue = "117427")]
|
||||
pub mod loongarch64 {
|
||||
pub use crate::core_arch::loongarch64::*;
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(target_arch = "x86", target_arch = "x86_64", doc))]
|
||||
|
|
@ -306,3 +316,7 @@ mod powerpc64;
|
|||
#[cfg(any(target_arch = "nvptx64", doc))]
|
||||
#[doc(cfg(target_arch = "nvptx64"))]
|
||||
mod nvptx;
|
||||
|
||||
#[cfg(any(target_arch = "loongarch64", doc))]
|
||||
#[doc(cfg(target_arch = "loongarch64"))]
|
||||
mod loongarch64;
|
||||
|
|
|
|||
3585
library/stdarch/crates/stdarch-gen-loongarch/lsx.spec
Normal file
3585
library/stdarch/crates/stdarch-gen-loongarch/lsx.spec
Normal file
File diff suppressed because it is too large
Load diff
5185
library/stdarch/crates/stdarch-gen-loongarch/lsxintrin.h
Normal file
5185
library/stdarch/crates/stdarch-gen-loongarch/lsxintrin.h
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue