about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCaleb Zulawski <caleb.zulawski@gmail.com>2020-12-14 00:34:32 -0500
committerCaleb Zulawski <caleb.zulawski@gmail.com>2020-12-14 00:34:32 -0500
commit62d98e3a11a289fc89da73f0c0601727de9cd28e (patch)
tree02d34d008bad8d28172bcba795f1a701d636c531
parent2720ccc5a78b4cbad1687aff59bb8631d59109c3 (diff)
downloadrust-62d98e3a11a289fc89da73f0c0601727de9cd28e.tar.gz
rust-62d98e3a11a289fc89da73f0c0601727de9cd28e.zip
Remove obsolete macros
-rw-r--r--crates/core_simd/src/macros.rs109
-rw-r--r--crates/core_simd/src/masks/mod.rs1
-rw-r--r--crates/core_simd/src/ops.rs15
3 files changed, 1 insertions, 124 deletions
diff --git a/crates/core_simd/src/macros.rs b/crates/core_simd/src/macros.rs
index 99adb669bc5..c8f8e222da1 100644
--- a/crates/core_simd/src/macros.rs
+++ b/crates/core_simd/src/macros.rs
@@ -26,115 +26,6 @@ macro_rules! from_transmute_x86 {
     }
 }
 
-/// Calls a the macro `$mac` with the provided `$args` followed by `$repeat` repeated the specified
-/// number of times.
-macro_rules! call_repeat {
-    { 1 => $mac:path [$($repeat:tt)*] $($args:tt)* } => {
-        $mac! {
-            $($args)*
-            $($repeat)*
-        }
-    };
-    { 2 => $mac:path [$($repeat:tt)*] $($args:tt)* } => {
-        $mac! {
-            $($args)*
-            $($repeat)* $($repeat)*
-        }
-    };
-    { 4 => $mac:path [$($repeat:tt)*] $($args:tt)* } => {
-        $mac! {
-            $($args)*
-            $($repeat)* $($repeat)* $($repeat)* $($repeat)*
-        }
-    };
-    { 8 => $mac:path [$($repeat:tt)*] $($args:tt)* } => {
-        $mac! {
-            $($args)*
-            $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
-        }
-    };
-    { 16 => $mac:path [$($repeat:tt)*] $($args:tt)* } => {
-        $mac! {
-            $($args)*
-            $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
-            $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
-        }
-    };
-    { 32 => $mac:path [$($repeat:tt)*] $($args:tt)* } => {
-        $mac! {
-            $($args)*
-            $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
-            $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
-            $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
-            $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
-        }
-    };
-    { 64 => $mac:path [$($repeat:tt)*] $($args:tt)* } => {
-        $mac! {
-            $($args)*
-            $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
-            $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
-            $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
-            $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
-            $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
-            $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
-            $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
-            $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)* $($repeat)*
-        }
-    };
-}
-
-/// Calls the macro `$mac` with the specified `$args` followed by the specified number of unique
-/// identifiers.
-macro_rules! call_counting_args {
-    { 1 => $mac:path => $($args:tt)* } => {
-        $mac! {
-            $($args)*
-            value
-        }
-    };
-    { 2 => $mac:path => $($args:tt)* } => {
-        $mac! {
-            $($args)*
-            v0 v1
-        }
-    };
-    { 4 => $mac:path => $($args:tt)* } => {
-        $mac! {
-            $($args)*
-            v0 v1 v2 v3
-        }
-    };
-    { 8 => $mac:path => $($args:tt)* } => {
-        $mac! {
-            $($args)*
-            v0 v1 v2 v3 v4 v5 v6 v7
-        }
-    };
-    { 16 => $mac:path => $($args:tt)* } => {
-        $mac! {
-            $($args)*
-            v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11 v12 v13 v14 v15
-        }
-    };
-    { 32 => $mac:path => $($args:tt)* } => {
-        $mac! {
-            $($args)*
-            v0  v1  v2  v3  v4  v5  v6  v7  v8  v9  v10 v11 v12 v13 v14 v15
-            v16 v17 v18 v19 v20 v21 v22 v23 v24 v25 v26 v27 v28 v29 v30 v31
-        }
-    };
-    { 64 => $mac:path => $($args:tt)* } => {
-        $mac! {
-            $($args)*
-            v0  v1  v2  v3  v4  v5  v6  v7  v8  v9  v10 v11 v12 v13 v14 v15
-            v16 v17 v18 v19 v20 v21 v22 v23 v24 v25 v26 v27 v28 v29 v30 v31
-            v32 v33 v34 v35 v36 v37 v38 v39 v40 v41 v42 v43 v44 v45 v46 v47
-            v48 v49 v50 v51 v52 v53 v54 v55 v56 v57 v58 v59 v60 v61 v62 v63
-        }
-    };
-}
-
 /// Implements common traits on the specified vector `$name`, holding multiple `$lanes` of `$type`.
 macro_rules! impl_vector {
     { $name:ident, $type:ty } => {
diff --git a/crates/core_simd/src/masks/mod.rs b/crates/core_simd/src/masks/mod.rs
index 9c90373fb47..a075040affe 100644
--- a/crates/core_simd/src/masks/mod.rs
+++ b/crates/core_simd/src/masks/mod.rs
@@ -1,6 +1,7 @@
 //! Types and traits associated with masking lanes of vectors.
 #![allow(non_camel_case_types)]
 
+/// Implements bitwise ops on mask types by delegating the operators to the inner type.
 macro_rules! delegate_ops_to_inner {
     { $name:ident } => {
         impl<const LANES: usize> core::ops::BitAnd for $name<LANES> {
diff --git a/crates/core_simd/src/ops.rs b/crates/core_simd/src/ops.rs
index 942d071de44..a21e9ab5bf1 100644
--- a/crates/core_simd/src/ops.rs
+++ b/crates/core_simd/src/ops.rs
@@ -262,21 +262,6 @@ macro_rules! impl_float_ops {
     };
 }
 
-/// Implements mask operators for the provided types.
-macro_rules! impl_mask_ops {
-    { $($scalar:ty => $($vector:ident),*;)* } => {
-        $( // scalar
-            $( // vector
-                impl_op! { impl BitAnd for $vector, $scalar }
-                impl_op! { impl BitOr  for $vector, $scalar }
-                impl_op! { impl BitXor for $vector, $scalar }
-                impl_op! { impl Not for $vector, $scalar }
-                impl_op! { impl Index for $vector, $scalar }
-            )*
-        )*
-    };
-}
-
 /// Implements unsigned integer operators for the provided types.
 macro_rules! impl_unsigned_int_ops {
     { $($scalar:ty => $($vector:ident),*;)* } => {