summaryrefslogtreecommitdiffstats
path: root/third_party/rust/packed_simd/src/codegen.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /third_party/rust/packed_simd/src/codegen.rs
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/packed_simd/src/codegen.rs')
-rw-r--r--third_party/rust/packed_simd/src/codegen.rs62
1 files changed, 62 insertions, 0 deletions
diff --git a/third_party/rust/packed_simd/src/codegen.rs b/third_party/rust/packed_simd/src/codegen.rs
new file mode 100644
index 0000000000..8a9e971486
--- /dev/null
+++ b/third_party/rust/packed_simd/src/codegen.rs
@@ -0,0 +1,62 @@
+//! Code-generation utilities
+
+pub(crate) mod bit_manip;
+pub(crate) mod llvm;
+pub(crate) mod math;
+pub(crate) mod reductions;
+pub(crate) mod shuffle;
+pub(crate) mod shuffle1_dyn;
+pub(crate) mod swap_bytes;
+
+macro_rules! impl_simd_array {
+ ([$elem_ty:ident; $elem_count:expr]:
+ $tuple_id:ident | $($elem_tys:ident),*) => {
+ #[derive(Copy, Clone)]
+ #[repr(simd)]
+ pub struct $tuple_id($(pub(crate) $elem_tys),*);
+ //^^^^^^^ leaked through SimdArray
+
+ impl crate::sealed::Seal for [$elem_ty; $elem_count] {}
+
+ impl crate::sealed::SimdArray for [$elem_ty; $elem_count] {
+ type Tuple = $tuple_id;
+ type T = $elem_ty;
+ const N: usize = $elem_count;
+ type NT = [u32; $elem_count];
+ }
+
+ impl crate::sealed::Seal for $tuple_id {}
+ impl crate::sealed::Simd for $tuple_id {
+ type Element = $elem_ty;
+ const LANES: usize = $elem_count;
+ type LanesType = [u32; $elem_count];
+ }
+
+ }
+}
+
+pub(crate) mod pointer_sized_int;
+
+pub(crate) mod v16;
+pub(crate) use self::v16::*;
+
+pub(crate) mod v32;
+pub(crate) use self::v32::*;
+
+pub(crate) mod v64;
+pub(crate) use self::v64::*;
+
+pub(crate) mod v128;
+pub(crate) use self::v128::*;
+
+pub(crate) mod v256;
+pub(crate) use self::v256::*;
+
+pub(crate) mod v512;
+pub(crate) use self::v512::*;
+
+pub(crate) mod vSize;
+pub(crate) use self::vSize::*;
+
+pub(crate) mod vPtr;
+pub(crate) use self::vPtr::*;