diff options
Diffstat (limited to 'library/stdarch/crates/core_arch/src/mips/msa')
-rw-r--r-- | library/stdarch/crates/core_arch/src/mips/msa/macros.rs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/library/stdarch/crates/core_arch/src/mips/msa/macros.rs b/library/stdarch/crates/core_arch/src/mips/msa/macros.rs new file mode 100644 index 000000000..de8905840 --- /dev/null +++ b/library/stdarch/crates/core_arch/src/mips/msa/macros.rs @@ -0,0 +1,31 @@ +//! Utility macros. + +macro_rules! static_assert_imm_s5 { + ($imm:ident) => { + let _ = $crate::core_arch::macros::ValidateConstImm::<$imm, -16, 15>::VALID; + }; +} + +macro_rules! static_assert_imm_s10 { + ($imm:ident) => { + let _ = $crate::core_arch::macros::ValidateConstImm::<$imm, -512, 511>::VALID; + }; +} + +macro_rules! static_assert_imm_s11 { + ($imm:ident) => { + let _ = $crate::core_arch::macros::ValidateConstImm::<$imm, -1024, 1023>::VALID; + }; +} + +macro_rules! static_assert_imm_s12 { + ($imm:ident) => { + let _ = $crate::core_arch::macros::ValidateConstImm::<$imm, -2048, 2047>::VALID; + }; +} + +macro_rules! static_assert_imm_s13 { + ($imm:ident) => { + let _ = $crate::core_arch::macros::ValidateConstImm::<$imm, -4096, 4095>::VALID; + }; +} |