Skip to content

Commit 471e667

Browse files
tesujiAmanieu
authored andcommitted
Add static_assert_imm_s10 macros
1 parent 9a8c044 commit 471e667

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/core_arch/src/mips/msa/macros.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
//! Utility macros.
22
3+
macro_rules! static_assert_imm_s10 {
4+
($imm:ident) => {
5+
let _ = $crate::core_arch::macros::ValidateConstImm::<$imm, -512, 511>::VALID;
6+
};
7+
}
8+
39
//immediate value: -4096:4088
410
macro_rules! constify_imm_s13 {
511
($imm_s13:expr, $expand:ident) => {

0 commit comments

Comments
 (0)